Date.dayOfGregorianCal

The Xth day of the Gregorian Calendar that this Date is on.

  1. int dayOfGregorianCal [@property getter]
  2. int dayOfGregorianCal [@property setter]
    struct Date
    @property @safe pure nothrow @nogc
    void
    dayOfGregorianCal
    (
    int day
    )

Parameters

day int

The day of the Gregorian Calendar to set this Date to.

Examples

auto date = Date.init;
date.dayOfGregorianCal = 1;
assert(date == Date(1, 1, 1));

date.dayOfGregorianCal = 365;
assert(date == Date(1, 12, 31));

date.dayOfGregorianCal = 366;
assert(date == Date(2, 1, 1));

date.dayOfGregorianCal = 0;
assert(date == Date(0, 12, 31));

date.dayOfGregorianCal = -365;
assert(date == Date(-0, 1, 1));

date.dayOfGregorianCal = -366;
assert(date == Date(-1, 12, 31));

date.dayOfGregorianCal = 730_120;
assert(date == Date(2000, 1, 1));

date.dayOfGregorianCal = 734_137;
assert(date == Date(2010, 12, 31));

Meta