commercial(y=-4712, w=1, d=1, h=0, min=0, s=0, of=0, sg=ITALY)public
The 24-hour clock is used. Negative values of h, min, and sec are treating as counting backwards from the end of the next larger unit (e.g. a min of -2 is treated as 58). No wraparound is performed. If an invalid time portion is specified, an ArgumentError is raised.
of is the offset from UTC as a fraction of a day (defaults to 0). sg specifies the Day of Calendar Reform.
y defaults to -4712, w to 1, and d to 1; this is Julian Day Number day 0. The time values default to 0.
# File lib/date.rb, line 1646 def self.commercial(y=-4712, w=1, d=1, h=0, min=0, s=0, of=0, sg=ITALY) unless (jd = _valid_commercial?(y, w, d, sg)) && (fr = _valid_time?(h, min, s)) raise ArgumentError, 'invalid date' end if String === of of = Rational(zone_to_diff(of) || 0, 86400) end new!(jd_to_ajd(jd, fr, of), of, sg) end