The OpenD Programming Language

SysTime.isAD

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

struct SysTime
@property @safe const nothrow scope
bool
isAD
()

Examples

import core.time;
import std.datetime.date : DateTime;

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

Meta