assert(YearMonth(1999, cast(Month) 1).dayOfYear == 1); assert(YearMonth(1999, cast(Month) 12).dayOfYear(AssumePeriod.begin) == 335); assert(YearMonth(1999, cast(Month) 12).dayOfYear(AssumePeriod.end) == 365); assert(YearMonth(2000, cast(Month) 12).dayOfYear(AssumePeriod.begin) == 336); assert(YearMonth(2000, cast(Month) 12).dayOfYear(AssumePeriod.end) == 366);
Day of the year this Date is on.