# File lib/date.rb, line 458
def jd_to_commercial(jd, sg=GREGORIAN) # :nodoc:
a = jd_to_civil(jd - 3, sg)[0]
y = if jd >= commercial_to_jd(a + 1, 1, 1, sg) then a + 1 else a end
w = 1 + ((jd - commercial_to_jd(y, 1, 1, sg)) / 7).floor
d = (jd + 1) % 7
d = 7 if d == 0
return y, w, d
end