The OpenD Programming Language

dayOfGregorianCal

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

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

Parameters

day int

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

Note: Zero value corresponds to

Examples

import mir.test;
auto date = Date.init;
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