The OpenD Programming Language

DateTime.isAD

Whether the current year is a date in A.D.

struct DateTime
@property const @safe pure nothrow @nogc
bool
isAD
()

Examples

assert(DateTime(Date(1, 1, 1), TimeOfDay(12, 7, 0)).isAD);
assert(DateTime(Date(2010, 12, 31), TimeOfDay(0, 0, 0)).isAD);
assert(!DateTime(Date(0, 12, 31), TimeOfDay(23, 59, 59)).isAD);
assert(!DateTime(Date(-2010, 1, 1), TimeOfDay(2, 2, 2)).isAD);

Meta