Operators | |
| typedef opSub | opCmp |
| DateValue | opAdd (int i) |
| Adds the given interval in days to this date. | |
| DateValue | opSub (int i) |
| Subtracts the given interval in days from this date. | |
| DateInterval | opSub (DateValue d) |
| Calculates the interval in days between this date and another date. | |
| DateValue | opAddAssign (int i) |
| Adds the given interval in days to this date. | |
| DateValue | opSubAssign (int i) |
| Subtracts the given interval in days from this date. | |
Public Types | |
| enum | { YEAR = 365, YEAR_4 = YEAR * 4 + 1, YEAR_100 = YEAR_4 * 25 - 1, YEAR_400 = YEAR_100 * 4 + 1 } |
| Constants representing the numbers of days in certain units of time significant to the Gregorian calendar. More... | |
Public Member Functions | |
| DateValue | nearest (DAY_OF_WEEK w) |
| Calculates the nearest occurrence of the given day of the week to this date. | |
| string | format (cstring formatString) |
| Formats this date according to a format string. | |
Properties | |
| int | year () |
| MONTH | month () |
| int | day () |
| DAY_OF_WEEK | dayOfWeek () |
| string | toString () |
| Returns a string representation of this date. | |
| char[] | toFormatString (uint flags=1) |
| Formats this date according to the OS-defined format. | |
| char[] | toShortFormatString () |
| Formats this date according to the OS-defined short format. | |
| char[] | toLongFormatString () |
| Formats this date according to the OS-defined long format. | |
Static Public Member Functions | |
| static DateValue | now () |
| Retrieves the current system date. | |
Pseudo-constructors | |
| static DateValue | opCall (int day) |
| Constructs a DateValue with the given dayNo value. | |
| static DateValue | opCall (int year, int month, int day) |
| Constructs a DateValue representing the given date. | |
Public Attributes | |
| int | dayNo = int.min |
| The internal numerical representation of the date, in days from 1 January 1BC (as it would be defined in the Gregorian calendar). | |
| typedef opSub smjg.libs.util.datetime.DateValue.opCmp |
| anonymous enum |
Constants representing the numbers of days in certain units of time significant to the Gregorian calendar.
| static DateValue smjg.libs.util.datetime.DateValue.opCall | ( | int | day | ) | [static] |
Constructs a DateValue with the given dayNo value.
| static DateValue smjg.libs.util.datetime.DateValue.opCall | ( | int | year, | |
| int | month, | |||
| int | day | |||
| ) | [static] |
Constructs a DateValue representing the given date.
| year | the year. | |
| month | the month, from 1 (January) to 12 (December). A MONTH value can be used. | |
| day | the day of the month. |
| DateTimeException | if month or day is out of range. |
| static DateValue smjg.libs.util.datetime.DateValue.now | ( | ) | [static] |
| DateValue smjg.libs.util.datetime.DateValue.nearest | ( | DAY_OF_WEEK | w | ) |
Calculates the nearest occurrence of the given day of the week to this date.
| string smjg.libs.util.datetime.DateValue.format | ( | cstring | formatString | ) |
Formats this date according to a format string.
| formatString | the format string, as defined in smjg.libs.util.datetimeformat. |
| DateTimeFormatException | if the formatting fails, e.g. because of an error in the format string. |
| int smjg.libs.util.datetime.DateValue.year | ( | ) |
| MONTH smjg.libs.util.datetime.DateValue.month | ( | ) |
| int smjg.libs.util.datetime.DateValue.day | ( | ) |
| DAY_OF_WEEK smjg.libs.util.datetime.DateValue.dayOfWeek | ( | ) |
| string smjg.libs.util.datetime.DateValue.toString | ( | ) |
Returns a string representation of this date.
| char [] smjg.libs.util.datetime.DateValue.toFormatString | ( | uint | flags = 1 |
) |
Formats this date according to the OS-defined format.
| flags | a value to pass to the OS date-formatting API determining how to format the date. |
| char [] smjg.libs.util.datetime.DateValue.toShortFormatString | ( | ) |
Formats this date according to the OS-defined short format.
| char [] smjg.libs.util.datetime.DateValue.toLongFormatString | ( | ) |
Formats this date according to the OS-defined long format.
| DateValue smjg.libs.util.datetime.DateValue.opAdd | ( | int | i | ) |
Adds the given interval in days to this date.
| DateValue smjg.libs.util.datetime.DateValue.opSub | ( | int | i | ) |
Subtracts the given interval in days from this date.
| DateInterval smjg.libs.util.datetime.DateValue.opSub | ( | DateValue | d | ) |
Calculates the interval in days between this date and another date.
| DateValue smjg.libs.util.datetime.DateValue.opAddAssign | ( | int | i | ) |
Adds the given interval in days to this date.
| DateValue smjg.libs.util.datetime.DateValue.opSubAssign | ( | int | i | ) |
Subtracts the given interval in days from this date.
| int smjg.libs.util.datetime.DateValue.dayNo = int.min |
The internal numerical representation of the date, in days from 1 January 1BC (as it would be defined in the Gregorian calendar).
A value of int.min denotes an invalid or null date.
1.5.4