Qore Programming Language Reference Manual
0.8.11.1
|
Methods in this pseudo-class can be executed on date/time value types. More...
Public Member Functions | |
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 | 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... | |
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 ref absolute_dates "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 ref absolute_dates "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 | info () |
Returns a hash of broken-down date/time information 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 | 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 Functions 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 | empty () |
Returns True; this method will be reimplemented in container types where it may return False. 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 value that would be converted to True according to the rules described in %perl-bool-eval. 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>::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)
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 ref absolute_dates "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 ref absolute_dates "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 <date>::info | ( | ) |
Returns a hash of broken-down date/time information 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>::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.