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