SysTime.yearBC

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

  1. ushort yearBC [@property getter]
    struct SysTime
    @property @safe const scope
    ushort
    yearBC
    ()
  2. int yearBC [@property setter]

Throws

Examples

import std.datetime.date : DateTime;

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

Meta