The OpenD Programming Language

DateTime.yearBC

Year B.C. of the Gregorian Calendar counting year 0 as 1 B.C.

  1. short yearBC [@property getter]
    struct DateTime
    @property const @safe pure
    short
    yearBC
    ()
  2. int yearBC [@property setter]

Throws

Examples

assert(DateTime(Date(0, 1, 1), TimeOfDay(12, 30, 33)).yearBC == 1);
assert(DateTime(Date(-1, 1, 1), TimeOfDay(10, 7, 2)).yearBC == 2);
assert(DateTime(Date(-100, 1, 1), TimeOfDay(4, 59, 0)).yearBC == 101);

Meta