Qore Programming Language Reference Manual 2.0.0
|
Methods in this pseudo-class can be executed on date/time value types. More...
#include <Pseudo_QC_Date.dox.h>
Public Member Methods | |
bool | absolute () |
Returns True if the date is an absolute date/time value. | |
__7_ 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. | |
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. | |
int | dayOfWeek () |
Returns an integer representing the day of the week for the absolute date value (0=Sunday, 6=Saturday) | |
int | days () |
Returns an integer corresponding to the literal day value in the date (does not calculate a duration) | |
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) | |
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) | |
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) | |
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) | |
string | format (string format) |
Returns a formatted string for the date value. | |
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. | |
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. | |
int | getUtcOffset () |
Returns the time zone offset for the current time in seconds east of UTC or -1 for relative date/time values. | |
int | hours () |
Returns an integer corresponding to the literal hour value in the date (does not calculate a duration) | |
hash< DateTimeInfo > | info () |
Returns a DateTimeInfo hash for the date (can be either a relative or absolute date) | |
bool | intp () |
Returns True because date values can be converted to integers. | |
bool | isDst () |
Returns True if the current date/time value is currently in daylight savings time. | |
int | isoDayOfWeek () |
Returns an integer representing the ISO-8601 day of the week for the absolute date value (1=Monday, 7=Sunday) | |
hash< IsoWeekInfo > | isoWeekHash () |
Returns an IsoWeekInfo hash representing the ISO-8601 calendar week information for the absolute date (hash keys: "year" , "week" , "day" ) | |
string | isoWeekString () |
Returns a string representing the ISO-8601 calendar week information for the absolute date (ex: 2006-01-01 = "2005-W52-7") | |
int | microseconds () |
Returns an integer corresponding to the literal microsecond value in the date (does not calculate a duration) | |
date | midnight () |
Returns midnight on the given date (strips the time component on the new value) | |
int | milliseconds () |
Returns an integer corresponding to the literal millisecond value in the date (does not calculate a duration) | |
int | minutes () |
Returns an integer corresponding to the literal minute value in the date (does not calculate a duration) | |
int | months () |
Returns an integer corresponding to the literal month value in the date (does not calculate a duration) | |
bool | relative () |
Returns True if the date is a relative date/time value. | |
int | seconds () |
Returns an integer corresponding to the literal second value in the date (does not calculate a duration) | |
bool | strp () |
Returns True because boolean values can be converted to strings. | |
int | typeCode () |
Returns Qore::NT_DATE. | |
bool | val () |
Returns False if the date value is all zeros, True if not. | |
int | years () |
Returns an integer corresponding to the literal year value in the date (does not calculate a duration) | |
__7_ TimeZone | zone () |
Returns a Qore::TimeZone object for the time zone of the date/time value; returns NOTHING for relative date/time values. | |
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) | |
bool | complexType () |
returns True if the value has a complex type, False if not | |
bool | empty () |
Returns True; this method will be reimplemented in container types where it may return False. | |
string | fullType (__7_ bool with_namespaces) |
returns the full type name which differs from the simple type name in case of complex types and objects | |
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. | |
AbstractIterator | iterator () |
Returns an iterator object for the value; the default iterator object returned is SingleValueIterator. | |
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. | |
int | size () |
Returns zero; this method will be reimplemented in container types where it may return a non-zero value. | |
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) | |
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. | |
bool | toBool () |
Returns the boolean representation of the value; the default is False. | |
float | toFloat () |
Returns the floating-point representation of the value; the default is 0.0. | |
int | toInt () |
Returns the integer representation of the value; the default is 0. | |
number | toNumber () |
Returns the arbitrary-precision numeric representation of the value; the default is 0. | |
string | toString (__7_ string encoding) |
Returns the string representation of the value; the default is an empty string. | |
string | type () |
Returns the string type for the value. | |
int | typeCode () |
Returns the type code for the value. | |
bool | val () |
Returns False; this method is reimplemented in other types and will return True if the given expression has a non-empty value. | |
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.
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 | ( | ) |
Returns Qore::NT_DATE.
bool <date>::val | ( | ) |
int <date>::years | ( | ) |
Returns an integer corresponding to the literal year value in the date (does not calculate a duration)
Returns a Qore::TimeZone object for the time zone of the date/time value; returns NOTHING for relative date/time values.