The OpenD Programming Language

Date.yearBC

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

  1. ushort yearBC [@property getter]
  2. int yearBC [@property setter]
    struct Date
    @property @safe pure
    void
    yearBC
    (
    int year
    )

Parameters

year int

The year B.C. to set this Date's year to.

Throws

std.datetime.date.DateTimeException if a non-positive value is given.

Examples

auto date = Date(2010, 1, 1);
date.yearBC = 1;
assert(date == Date(0, 1, 1));

date.yearBC = 10;
assert(date == Date(-9, 1, 1));

Meta