commercial(y=1582, w=41, d=5, sg=ITALY)public
Monday is day-of-week 1; Sunday is day-of-week 7.
w and d can be negative, in which case they count backwards from the end of the year and the end of the week respectively. No wraparound is performed, however, and invalid values cause an ArgumentError to be raised.
y defaults to 1582, w to 41, and d to 5, the Day of Calendar Reform for Italy and the Catholic countries.
sg specifies the Day of Calendar Reform.
# File lib/date.rb, line 748 def self.commercial(y=1582, w=41, d=5, sg=ITALY) unless jd = valid_commercial?(y, w, d, sg) raise ArgumentError, 'invalid date' end new!(jd_to_ajd(jd, 0, 0), 0, sg) end