Method: DateTime.civil

Defined in:
date_core.c

.civil([year = -4712[, month=1[, mday=1[, hour=0[, minute=0[, second=0[, offset=0[, start=Date::ITALY]]]]]]]]) ⇒ Object .new([year = -4712[, month=1[, mday=1[, hour=0[, minute=0[, second=0[, offset=0[, start=Date::ITALY]]]]]]]]) ⇒ Object

Creates a DateTime 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')

#=> #<DateTime: 2001-02-03T04:05:06+07:00 …>



7419
7420
7421
7422
7423
# File 'date_core.c', line 7419

static VALUE
datetime_s_civil(int argc, VALUE *argv, VALUE klass)
{
    return datetime_initialize(argc, argv, d_lite_s_alloc_complex(klass));
}