Qore Programming Language Reference Manual  0.9.4.1
Pseudo_QC_Date.dox.h
1 namespace Qore {
4 /***/
5 class <date> : public <value> {
6 
7 public:
9 
16 bool absolute();
17 
18 public:
20 
30 *string currentZoneName();
31 
32 public:
34 
48 int dayNumber();
49 
50 public:
52 
68 int dayOfWeek();
69 
70 public:
72 
86 int days();
87 
88 public:
90 
118 
119 public:
121 
151 
152 public:
154 
183 int durationSeconds();
184 
185 public:
187 
210 float durationSecondsFloat();
211 
212 public:
214 
230 string format(string format);
231 
232 public:
234 
246 int getEpochSeconds();
247 
248 public:
250 
263 
264 public:
266 
276 int getUtcOffset();
277 
278 public:
280 
294 int hours();
295 
296 public:
298 
312 hash<DateTimeInfo> info();
313 
314 public:
316 
327 bool intp();
328 
329 public:
331 
341 bool isDst();
342 
343 public:
345 
361 int isoDayOfWeek();
362 
363 public:
365 
383 hash<IsoWeekInfo> isoWeekHash();
384 
385 public:
387 
403 string isoWeekString();
404 
405 public:
407 
423 int microseconds();
424 
425 public:
427 
441 date midnight();
442 
443 public:
445 
461 int milliseconds();
462 
463 public:
465 
479 int minutes();
480 
481 public:
483 
497 int months();
498 
499 public:
501 
508 bool relative();
509 
510 public:
512 
528 int seconds();
529 
530 public:
532 
543 bool strp();
544 
545 public:
547 
558 int typeCode();
559 
560 public:
562 
576 bool val();
577 
578 public:
580 
592 int years();
593 
594 public:
596 
606 *TimeZone zone();
607 };
608 };
<date>::getUtcOffset
int getUtcOffset()
Returns the time zone offset for the current time in seconds east of UTC or -1 for relative date/time...
<date>::microseconds
int microseconds()
Returns an integer corresponding to the literal microsecond value in the date (does not calculate a d...
<date>::info
hash< DateTimeInfo > info()
Returns a DateTimeInfo hash for the date (can be either a relative or absolute date)
<date>::getEpochSeconds
int getEpochSeconds()
Returns the number of seconds since the start of the epoch (1970-01-01Z) for the current date for abs...
<date>::zone
*TimeZone zone()
Returns a Qore::TimeZone object for the time zone of the date/time value; returns NOTHING for relativ...
<date>::months
int months()
Returns an integer corresponding to the literal month value in the date (does not calculate a duratio...
<date>::intp
bool intp()
Returns True because date values can be converted to integers.
<date>::getEpochSecondsLocalTime
int getEpochSecondsLocalTime()
Returns the number of seconds since the start of the epoch (1970-01-01) for the current date in the l...
<date>::milliseconds
int milliseconds()
Returns an integer corresponding to the literal millisecond value in the date (does not calculate a d...
<date>::dayOfWeek
int dayOfWeek()
Returns an integer representing the day of the week for the absolute date value (0=Sunday,...
<date>::durationSecondsFloat
float durationSecondsFloat()
Returns a floating-point value representing the the number of seconds of duration in the value of the...
<date>::isoWeekString
string isoWeekString()
Returns a string representing the ISO-8601 calendar week information for the absolute date (ex: 2006-...
<date>::absolute
bool absolute()
Returns True if the date is an absolute date/time value.
<date>::years
int years()
Returns an integer corresponding to the literal year value in the date (does not calculate a duration...
<date>::minutes
int minutes()
Returns an integer corresponding to the literal minute value in the date (does not calculate a durati...
<date>::dayNumber
int dayNumber()
Returns an integer representing the ordinal day number in the year (corresponding to the ISO-8601 day...
<date>::isDst
bool isDst()
Returns True if the current date/time value is currently in daylight savings time.
<date>::format
string format(string format)
Returns a formatted string for the date value.
<date>::durationMilliseconds
int durationMilliseconds()
Returns an integer value representing the the number of milliseconds of time duration in the date val...
<date>::relative
bool relative()
Returns True if the date is a relative date/time value.
Qore::TimeZone
The TimeZone class provides access to time zone functionality.
Definition: QC_TimeZone.dox.h:11
<date>::strp
bool strp()
Returns True because boolean values can be converted to strings.
<date>::midnight
date midnight()
Returns midnight on the given date (strips the time component on the new value)
<date>
Methods in this pseudo-class can be executed on date/time value types.
Definition: Pseudo_QC_Date.dox.h:5
<date>::typeCode
int typeCode()
Returns Qore::NT_DATE.
<value>
Methods in this pseudo-class are available to be executed on any value type (even NOTHING); this is t...
Definition: Pseudo_QC_All.dox.h:5
<date>::isoWeekHash
hash< IsoWeekInfo > isoWeekHash()
Returns an IsoWeekInfo hash representing the ISO-8601 calendar week information for the absolute date...
<date>::durationMicroseconds
int durationMicroseconds()
Returns an integer value representing the the number of microseconds of time duration in the date val...
<date>::isoDayOfWeek
int isoDayOfWeek()
Returns an integer representing the ISO-8601 day of the week for the absolute date value (1=Monday,...
<date>::durationSeconds
int durationSeconds()
Returns an integer value representing the the number of seconds of time duration in the date value (c...
<date>::val
bool val()
Returns False if the date value is all zeros, True if not.
Qore::date
date date(date dt)
Returns the date passed.
<date>::hours
int hours()
Returns an integer corresponding to the literal hour value in the date (does not calculate a duration...
Qore
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:2
<date>::currentZoneName
*string currentZoneName()
Returns the name of the current time zone for the current absolute date/time value (ex: "CEST" for Ce...
<date>::seconds
int seconds()
Returns an integer corresponding to the literal second value in the date (does not calculate a durati...
<date>::days
int days()
Returns an integer corresponding to the literal day value in the date (does not calculate a duration)