The OpenD Programming Language

YearQuarter.dayOfQuarter

Day of the quarter this Date is on.

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

Examples

assert(YearQuarter(1999, cast(Quarter) 1).dayOfQuarter == 1);
assert(YearQuarter(1999, cast(Quarter) 1).dayOfQuarter(AssumePeriod.begin, AssumePeriod.end) == 31);
assert(YearQuarter(1999, cast(Quarter) 1).dayOfQuarter(AssumePeriod.end) == 90);

assert(YearQuarter(2000, cast(Quarter) 1).dayOfQuarter(AssumePeriod.begin, AssumePeriod.end) == 31);
assert(YearQuarter(2000, cast(Quarter) 1).dayOfQuarter(AssumePeriod.end) == 91);

assert(YearQuarter(2000, cast(Quarter) 4).dayOfQuarter == 1);
assert(YearQuarter(2000, cast(Quarter) 4).dayOfQuarter(AssumePeriod.begin, AssumePeriod.end) == 31);
assert(YearQuarter(2000, cast(Quarter) 4).dayOfQuarter(AssumePeriod.end) == 92);

Meta