ordinal

DateTime.ordinal([year=-4712[, yday=1[, hour=0[, minute=0[, second=0[, offset=0[, start=Date::ITALY]]]]]]]) â datetime Class Public methods Creates a date-time object denoting the given ordinal date. DateTime.ordinal(2001,34) #=> #<DateTime: 2001-02-03T00:00:00+00:00 ...> DateTime.ordinal(2001,34,4,5,6,'+7') #=> #<DateTime: 2001-02-03T04:05:06+07:00 ...> DateTime.ordinal(2001,-332,-20,-55,-54,'+7') #=> #<

now

DateTime.now([start=Date::ITALY]) â datetime Class Public methods Creates a date-time object denoting the present time. DateTime.now #=> #<DateTime: 2011-06-11T21:20:44+09:00 ...>

new

DateTime.new([year=-4712[, month=1[, mday=1[, hour=0[, minute=0[, second=0[, offset=0[, start=Date::ITALY]]]]]]]]) â datetime Class Public methods Creates a date-time object denoting the given calendar date. DateTime.new(2001,2,3) #=> #<DateTime: 2001-02-03T00:00:00+00:00 ...> DateTime.new(2001,2,3,4,5,6,'+7') #=> #<DateTime: 2001-02-03T04:05:06+07:00 ...> DateTime.new(2001,-11,-26,-20,-55,-54,'+7') #=>

json_create

json_create(object) Class Public methods Deserializes JSON string by converting year y, month m, day d, hour H, minute M, second S, offset of and Day of Calendar Reform sg to DateTime.

jisx0301

DateTime.jisx0301(string='-4712-01-01T00:00:00+00:00'[, start=ITALY]) â datetime Class Public methods Creates a new Date object by parsing from a string according to some typical JIS X 0301 formats. DateTime.jisx0301('H13.02.03T04:05:06+07:00') #=> #<DateTime: 2001-02-03T04:05:06+07:00 ...>

jd

DateTime.jd([jd=0[, hour=0[, minute=0[, second=0[, offset=0[, start=Date::ITALY]]]]]]) â datetime Class Public methods Creates a datetime object denoting the given chronological Julian day number. DateTime.jd(2451944) #=> #<DateTime: 2001-02-03T00:00:00+00:00 ...> DateTime.jd(2451945) #=> #<DateTime: 2001-02-04T00:00:00+00:00 ...> DateTime.jd(Rational('0.5')) #=> #<DateTime: -4712-01-01T12:00:00+00:00 ...>

iso8601

DateTime.iso8601(string='-4712-01-01T00:00:00+00:00'[, start=ITALY]) â datetime Class Public methods Creates a new Date object by parsing from a string according to some typical ISO 8601 formats. DateTime.iso8601('2001-02-03T04:05:06+07:00') #=> #<DateTime: 2001-02-03T04:05:06+07:00 ...> DateTime.iso8601('20010203T040506+0700') #=> #<DateTime: 2001-02-03T04:05:06+07:00 ...> DateTime.iso8601('2001-W05-6T04:05:06

httpdate

DateTime.httpdate(string='Mon, 01 Jan -4712 00:00:00 GMT'[, start=ITALY]) â datetime Class Public methods Creates a new Date object by parsing from a string according to some RFC 2616 format. DateTime.httpdate('Sat, 03 Feb 2001 04:05:06 GMT') #=> #<DateTime: 2001-02-03T04:05:06+00:00 ...>

commercial

DateTime.commercial([cwyear=-4712[, cweek=1[, cwday=1[, hour=0[, minute=0[, second=0[, offset=0[, start=Date::ITALY]]]]]]]]) â datetime Class Public methods Creates a date-time object denoting the given week date. DateTime.commercial(2001) #=> #<DateTime: 2001-01-01T00:00:00+00:00 ...> DateTime.commercial(2002) #=> #<DateTime: 2001-12-31T00:00:00+00:00 ...> DateTime.commercial(2001,5,6,4,5,6,'+7') #=> #<DateTime: 2001-02-03T04:05

civil

DateTime.civil([year=-4712[, month=1[, mday=1[, hour=0[, minute=0[, second=0[, offset=0[, start=Date::ITALY]]]]]]]]) â datetime Class Public methods Creates a date-time object denoting the given calendar date. DateTime.new(2001,2,3) #=> #<DateTime: 2001-02-03T00:00:00+00:00 ...> DateTime.new(2001,2,3,4,5,6,'+7') #=> #<DateTime: 2001-02-03T04:05:06+07:00 ...> DateTime.new(2001,-11,-26,-20,-55,-54,'+7') #=>