The OpenD Programming Language

YearQuarter.dayOfYear

Day of the year this Date is on.

  1. int dayOfYear(AssumePeriod assumePeriodMonth, AssumePeriod assumePeriodDay)
    struct YearQuarter
    @property const @safe pure nothrow @nogc
    int
    dayOfYear
  2. AssumePeriod dayOfYear [@property setter]

Examples

assert(YearQuarter(1999, cast(Quarter) 1).dayOfYear == 1);
assert(YearQuarter(1999, cast(Quarter) 4).dayOfYear == 274);
assert(YearQuarter(1999, cast(Quarter) 4).dayOfYear(AssumePeriod.begin, AssumePeriod.end) == 304);
assert(YearQuarter(1999, cast(Quarter) 4).dayOfYear(AssumePeriod.end) == 365);
assert(YearQuarter(2000, cast(Quarter) 4).dayOfYear == 275);
assert(YearQuarter(2000, cast(Quarter) 4).dayOfYear(AssumePeriod.begin, AssumePeriod.end) == 305);
assert(YearQuarter(2000, cast(Quarter) 4).dayOfYear(AssumePeriod.end) == 366);

Meta