The OpenD Programming Language

YearMonth

Represents a date as a pair of years and months.

Constructors

this
this(short year, Month month)
this
this(short year, ushort month)
this
this(Date date)
this
this(YearMonthDay yearMonthDay)
this
this(YearQuarter yearQuarter, AssumePeriod assumePeriod)
this
this(Timestamp timestamp)
this
this(const(char)[] str)

Members

Aliases

opBinaryRight
alias opBinaryRight(string op : "+") = opBinary!"+"
opCast
alias opCast(T : Timestamp) = timestamp

Functions

add
deprecated YearMonth add(long months)
add
deprecated YearMonth add(long quarters)
add
deprecated YearMonth add(long years)
addMonths
YearMonth addMonths(long months)
addQuarters
YearMonth addQuarters(long quarters)
addYears
YearMonth addYears(long years)
endOfMonth
Date endOfMonth()
lengthOfMonth
ushort lengthOfMonth()
opBinary
int opBinary(YearMonth rhs)
opBinary
YearMonth opBinary(int rhs)
opCmp
int opCmp(YearMonth rhs)
opOpAssign
YearMonth opOpAssign(int rhs)
quarter
Quarter quarter()
timestamp
Timestamp timestamp()
toHash
size_t toHash()
toISOExtString
void toISOExtString(W w)
trustedWithDayOfMonth
Date trustedWithDayOfMonth(int days)

Properties

dayOfYear
AssumePeriod dayOfYear [@property setter]

Day of the year this Date is on.

daysInMonth
ubyte daysInMonth [@property getter]

The last day in the month that this Date is in.

isAD
bool isAD [@property getter]

Whether the current year is a date in A.D.

isLeapYear
bool isLeapYear [@property getter]

Whether this Date is in a leap year.

Meta