The OpenD Programming Language

DateTime.dayOfYear

Day of the year this DateTime is on.

  1. ushort dayOfYear [@property getter]
    struct DateTime
    @property const @safe pure nothrow @nogc
    ushort
    dayOfYear
    ()
  2. int dayOfYear [@property setter]

Examples

assert(DateTime(Date(1999, 1, 1), TimeOfDay(12, 22, 7)).dayOfYear == 1);
assert(DateTime(Date(1999, 12, 31), TimeOfDay(7, 2, 59)).dayOfYear == 365);
assert(DateTime(Date(2000, 12, 31), TimeOfDay(21, 20, 0)).dayOfYear == 366);

Meta