var.isDate

bool isDate() @property const nothrow @nogc pure @safe

Check if this var holds a Date value.

More readable alternative to v.type == var.Type.DATE.

Returns

true if the value is a calendar date, false otherwise.

Examples

var d = Date(2024, 6, 15);
assert(d.isDate);
var i = 42;
assert(!i.isDate);