Qore Programming Language Reference Manual
0.9.1
|
Methods in this pseudo-class can be executed on date/time value types. More...
Public Member Methods | |
bool | absolute () |
Returns True if the date is an absolute date/time value. More... | |
*string | currentZoneName () |
Returns the name of the current time zone for the current absolute date/time value (ex: "CEST" for Central European Summer Time for a time during summer time or "CET" for Central European Time for the same time zone while daylight savings time is not active) or a UTC offset (like "+01" ) or "UTC" or NOTHING for relative date/time values. More... | |
int | dayNumber () |
Returns an integer representing the ordinal day number in the year (corresponding to the ISO-8601 day number) for the absolute date value. More... | |
int | dayOfWeek () |
Returns an integer representing the day of the week for the absolute date value (0=Sunday, 6=Saturday) More... | |
int | days () |
Returns an integer corresponding to the literal day value in the date (does not calculate a duration) More... | |
int | durationMicroseconds () |
Returns an integer value representing the the number of microseconds of time duration in the date value (can be either a relative or absolute date) More... | |
int | durationMilliseconds () |
Returns an integer value representing the the number of milliseconds of time duration in the date value (can be either a relative or absolute date) More... | |
int | durationSeconds () |
Returns an integer value representing the the number of seconds of time duration in the date value (can be either a relative or absolute date) More... | |
float | durationSecondsFloat () |
Returns a floating-point value representing the the number of seconds of duration in the value of the date passed (can be either a relative or absolute date) More... | |
string | format (string format) |
Returns a formatted string for the date value. More... | |
int | getEpochSeconds () |
Returns the number of seconds since the start of the epoch (1970-01-01Z) for the current date for absolute date/time values; returns 0 for relative date/time values. More... | |
int | getEpochSecondsLocalTime () |
Returns the number of seconds since the start of the epoch (1970-01-01) for the current date in the local time zone for absolute date/time values; returns 0 for relative date/time values. More... | |
int | getUtcOffset () |
Returns the time zone offset for the current time in seconds east of UTC or -1 for relative date/time values. More... | |
int | hours () |
Returns an integer corresponding to the literal hour value in the date (does not calculate a duration) More... | |
hash< DateTimeInfo > | info () |
Returns a DateTimeInfo hash for the date (can be either a relative or absolute date) More... | |
bool | intp () |
Returns True because date values can be converted to integers. More... | |
bool | isDst () |
Returns True if the current date/time value is currently in daylight savings time. More... | |
int | isoDayOfWeek () |
Returns an integer representing the ISO-8601 day of the week for the absolute date value (1=Monday, 7=Sunday) More... | |
hash< IsoWeekInfo > | isoWeekHash () |
Returns an IsoWeekInfo hash representing the ISO-8601 calendar week information for the absolute date (hash keys: "year" , "week" , "day" ) More... | |
string | isoWeekString () |
Returns a string representing the ISO-8601 calendar week information for the absolute date (ex: 2006-01-01 = "2005-W52-7") More... | |
int | microseconds () |
Returns an integer corresponding to the literal microsecond value in the date (does not calculate a duration) More... | |
date | midnight () |
Returns midnight on the given date (strips the time component on the new value) More... | |
int | milliseconds () |
Returns an integer corresponding to the literal millisecond value in the date (does not calculate a duration) More... | |
int | minutes () |
Returns an integer corresponding to the literal minute value in the date (does not calculate a duration) More... | |
int | months () |
Returns an integer corresponding to the literal month value in the date (does not calculate a duration) More... | |
bool | relative () |
Returns True if the date is a relative date/time value. More... | |
int | seconds () |
Returns an integer corresponding to the literal second value in the date (does not calculate a duration) More... | |
bool | strp () |
Returns True because boolean values can be converted to strings. More... | |
int | typeCode () |
Returns Qore::NT_DATE. More... | |
bool | val () |
Returns False if the date value is all zeros, True if not. More... | |
int | years () |
Returns an integer corresponding to the literal year value in the date (does not calculate a duration) More... | |
*TimeZone | zone () |
Returns a Qore::TimeZone object for the time zone of the date/time value; returns NOTHING for relative date/time values. More... | |
Public Member Methods inherited from <value> | |
bool | callp () |
Returns False; this method is reimplemented in other types and will return True if the given expression is a callable value (ie closures or call references) More... | |
bool | complexType () |
returns True if the value has a complex type, False if not More... | |
bool | empty () |
Returns True; this method will be reimplemented in container types where it may return False. More... | |
string | fullType () |
returns the full type name which differs from the simple type name in case of complex types and objects More... | |
bool | intp () |
Returns False; this method is reimplemented in other types and will return True if the given expression can be converted to an integer. More... | |
AbstractIterator | iterator () |
Returns an iterator object for the value; the default iterator object returned is SingleValueIterator. More... | |
int | lsize () |
Returns 1; the return value of this method should give the list size of the value, which is normally 1 for non-lists (except for NOTHING where the size will be 0) and the number of the elements in the list for lists; this method will be reimplemented in other types where it may return other values. More... | |
int | size () |
Returns zero; this method will be reimplemented in container types where it may return a non-zero value. More... | |
bool | sizep () |
Returns True if the type can return a non-zero size (True for containers including binary objects and strings, False for everything else) More... | |
bool | strp () |
Returns False; this method is reimplemented in other types and will return True if the given expression can be converted to a string. More... | |
bool | toBool () |
Returns the boolean representation of the value; the default is False. More... | |
float | toFloat () |
Returns the floating-point representation of the value; the default is 0.0. More... | |
int | toInt () |
Returns the integer representation of the value; the default is 0. More... | |
number | toNumber () |
Returns the arbitrary-precision numeric representation of the value; the default is 0. More... | |
string | toString () |
Returns the string representation of the value; the default is an empty string. More... | |
string | type () |
Returns the string type for the value. More... | |
int | typeCode () |
Returns the type code for the value. More... | |
bool | val () |
Returns False; this method is reimplemented in other types and will return True if the given expression has a non-empty value. More... | |
Methods in this pseudo-class can be executed on date/time value types.
bool <date>::absolute | ( | ) |
Returns True if the date is an absolute date/time value.
*string <date>::currentZoneName | ( | ) |
Returns the name of the current time zone for the current absolute date/time value (ex: "CEST"
for Central European Summer Time for a time during summer time or "CET"
for Central European Time for the same time zone while daylight savings time is not active) or a UTC offset (like "+01"
) or "UTC"
or NOTHING for relative date/time values.
"CEST"
for Central European Summer Time for a time during summer time or "CET"
for Central European Time for the same time zone while daylight savings time is not active) or a UTC offset (like "+01"
) or "UTC"
or NOTHING for relative date/time valuesint <date>::dayNumber | ( | ) |
Returns an integer representing the ordinal day number in the year (corresponding to the ISO-8601 day number) for the absolute date value.
int <date>::dayOfWeek | ( | ) |
Returns an integer representing the day of the week for the absolute date value (0=Sunday, 6=Saturday)
int <date>::days | ( | ) |
Returns an integer corresponding to the literal day value in the date (does not calculate a duration)
The date value can be either a relative or absolute date.
int <date>::durationMicroseconds | ( | ) |
Returns an integer value representing the the number of microseconds of time duration in the date value (can be either a relative or absolute date)
int <date>::durationMilliseconds | ( | ) |
Returns an integer value representing the the number of milliseconds of time duration in the date value (can be either a relative or absolute date)
The duration in milliseconds is calculated and any fractional milliseconds are truncated (no rounding is performed)
int <date>::durationSeconds | ( | ) |
Returns an integer value representing the the number of seconds of time duration in the date value (can be either a relative or absolute date)
The duration in seconds is calculated and any fractional seconds are truncated (no rounding is performed)
float <date>::durationSecondsFloat | ( | ) |
Returns a floating-point value representing the the number of seconds of duration in the value of the date passed (can be either a relative or absolute date)
The duration in seconds is calculated and any fractional seconds are returned as digits to the right of the decimal point.
Returns a formatted string for the date value.
format | a string giving the format for the date; see Date Formatting Codes for more information about this string |
int <date>::getEpochSeconds | ( | ) |
Returns the number of seconds since the start of the epoch (1970-01-01Z) for the current date for absolute date/time values; returns 0 for relative date/time values.
int <date>::getEpochSecondsLocalTime | ( | ) |
Returns the number of seconds since the start of the epoch (1970-01-01) for the current date in the local time zone for absolute date/time values; returns 0 for relative date/time values.
int <date>::getUtcOffset | ( | ) |
Returns the time zone offset for the current time in seconds east of UTC or -1 for relative date/time values.
int <date>::hours | ( | ) |
Returns an integer corresponding to the literal hour value in the date (does not calculate a duration)
The date value can be either a relative or absolute date.
hash<DateTimeInfo> <date>::info | ( | ) |
Returns a DateTimeInfo hash for the date (can be either a relative or absolute date)
bool <date>::intp | ( | ) |
bool <date>::isDst | ( | ) |
Returns True if the current date/time value is currently in daylight savings time.
int <date>::isoDayOfWeek | ( | ) |
Returns an integer representing the ISO-8601 day of the week for the absolute date value (1=Monday, 7=Sunday)
hash<IsoWeekInfo> <date>::isoWeekHash | ( | ) |
Returns an IsoWeekInfo hash representing the ISO-8601 calendar week information for the absolute date (hash keys: "year"
, "week"
, "day"
)
"year"
, "week"
, "day"
); if a relative date value is used, then this method will return year=1970, week=1, day=1string <date>::isoWeekString | ( | ) |
Returns a string representing the ISO-8601 calendar week information for the absolute date (ex: 2006-01-01 = "2005-W52-7")
"1970-W01-1"
int <date>::microseconds | ( | ) |
Returns an integer corresponding to the literal microsecond value in the date (does not calculate a duration)
The date value can be either a relative or absolute date.
date <date>::midnight | ( | ) |
Returns midnight on the given date (strips the time component on the new value)
int <date>::milliseconds | ( | ) |
Returns an integer corresponding to the literal millisecond value in the date (does not calculate a duration)
The date value can be either a relative or absolute date.
int <date>::minutes | ( | ) |
Returns an integer corresponding to the literal minute value in the date (does not calculate a duration)
The date value can be either a relative or absolute date.
int <date>::months | ( | ) |
Returns an integer corresponding to the literal month value in the date (does not calculate a duration)
The date value can be either a relative or absolute date.
bool <date>::relative | ( | ) |
Returns True if the date is a relative date/time value.
int <date>::seconds | ( | ) |
Returns an integer corresponding to the literal second value in the date (does not calculate a duration)
The date value can be either a relative or absolute date.
bool <date>::strp | ( | ) |
int <date>::typeCode | ( | ) |
bool <date>::val | ( | ) |
int <date>::years | ( | ) |
Returns an integer corresponding to the literal year value in the date (does not calculate a duration)
*TimeZone <date>::zone | ( | ) |
Returns a Qore::TimeZone object for the time zone of the date/time value; returns NOTHING for relative date/time values.