Qore Programming Language Reference Manual  0.9.4
ql_time.dox.h
1 
3 namespace Qore {
5 
7 struct DateTimeInfo {
9  int day;
11  int dow;
13  int doy;
15  bool dst;
17  int hour;
21  int minute;
23  int month;
25  bool relative;
27  int second;
31  int year;
35  string zone_name;
36 };
37 }
38 
40 namespace Qore {
42 
44 struct IsoWeekInfo {
46  int day;
48  int week;
50  int year;
51 };
52 }
53 
55 namespace Qore {
258 
273 int clock_getmicros();
274 
276 
290 int clock_getmillis();
291 
293 
307 int clock_getnanos();
308 
310 
319 date date(date dt);
320 
322 
346 date date(string dtstr);
347 
349 
363 date date(softfloat f);
364 
366 
380 date date(int i);
381 
383 
390 date date();
391 
393 
400 date date(null null);
401 
403 
420 date date(string dtstr, string mask);
421 
423 
437 hash<DateTimeInfo> date_info(date dt);
438 
440 
450 hash<DateTimeInfo> date_info();
451 
453 
467 date date_ms(softint ms);
468 
470 
474 nothing date_ms();
475 
477 
491 date date_us(softint us);
492 
494 
515 date days(softint days);
516 
518 
522 nothing days();
523 
525 
541 string format_date(string format, date dt);
542 
544 
548 nothing format_date();
549 
551 
567 date getDateFromISOWeek(softint year, softint week, softint day = 1);
568 
570 
579 int getDayNumber(date dt);
580 
582 
586 nothing getDayNumber();
587 
589 
600 int getDayOfWeek(date dt);
601 
603 
607 nothing getDayOfWeek();
608 
610 
621 int getISODayOfWeek(date dt);
622 
624 
628 nothing getISODayOfWeek();
629 
631 
644 hash<IsoWeekInfo> getISOWeekHash(date dt);
645 
647 
651 nothing getISOWeekHash();
652 
654 
670 string getISOWeekString(date dt);
671 
673 
677 nothing getISOWeekString();
678 
680 
701 date get_date_from_iso_week(softint year, softint week, softint day = 1);
702 
704 
720 int get_day_number(date dt);
721 
723 
741 int get_day_of_week(date dt);
742 
744 
758 int get_days(date dt);
759 
761 
765 nothing get_days();
766 
768 
790 
792 
816 
818 
842 int get_duration_seconds(date dt);
843 
845 
870 float get_duration_seconds_f(date dt);
871 
873 
889 int get_epoch_seconds(date dt);
890 
892 
896 nothing get_epoch_seconds();
897 
899 
913 int get_hours(date dt);
914 
916 
920 nothing get_hours();
921 
923 
941 int get_iso_day_of_week(date dt);
942 
944 
964 hash<IsoWeekInfo> get_iso_week_hash(date dt);
965 
967 
985 string get_iso_week_string(date dt);
986 
988 
1004 int get_microseconds(date dt);
1005 
1007 
1021 date get_midnight(date dt);
1022 
1024 
1028 nothing get_midnight();
1029 
1031 
1047 int get_milliseconds(date dt);
1048 
1050 
1054 nothing get_milliseconds();
1055 
1057 
1071 int get_minutes(date dt);
1072 
1074 
1078 nothing get_minutes();
1079 
1081 
1095 int get_months(date dt);
1096 
1098 
1102 nothing get_months();
1103 
1105 
1121 int get_seconds(date dt);
1122 
1124 
1128 nothing get_seconds();
1129 
1131 
1145 int get_years(date dt);
1146 
1148 
1152 nothing get_years();
1153 
1155 
1169 date gmtime();
1170 
1172 
1187 date gmtime(softint secs, softint us = 0);
1188 
1190 
1204 date gmtime(date dt);
1205 
1207 
1228 date hours(softint hours);
1229 
1231 
1235 nothing hours();
1236 
1238 
1252 bool is_date_absolute(date dt);
1253 
1255 
1259 bool is_date_absolute();
1260 
1262 
1276 bool is_date_relative(date dt);
1277 
1279 
1283 bool is_date_relative();
1284 
1286 
1300 date localtime();
1301 
1303 
1318 date localtime(softint secs, softint us = 0);
1319 
1321 
1335 date localtime(date dt);
1336 
1338 
1359 date microseconds(softint us);
1360 
1362 
1383 date milliseconds(softint ms);
1384 
1386 
1390 nothing milliseconds();
1391 
1393 
1414 date minutes(softint minutes);
1415 
1417 
1421 nothing minutes();
1422 
1424 
1440 int mktime(date dt);
1441 
1443 
1447 nothing mktime();
1448 
1450 
1471 date months(softint months);
1472 
1474 
1478 nothing months();
1479 
1481 
1498 date now();
1499 
1501 
1518 date now_ms();
1519 
1521 
1538 date now_us();
1539 
1541 
1553 date now_utc();
1554 
1556 
1577 date seconds(softint seconds);
1578 
1580 
1584 nothing seconds();
1585 
1587 
1601 int timegm(date dt);
1602 
1604 
1608 nothing timegm();
1609 
1611 
1632 date years(softint years);
1633 
1635 
1639 nothing years();
1640 
1642 }
int get_hours(date dt)
Returns an integer corresponding to the literal hour value in the date (does not calculate a duration...
int get_microseconds(date dt)
Returns an integer corresponding to the literal microsecond value in the date (does not calculate a d...
int getDayNumber(date dt)
Returns an integer representing the ordinal day number in the year (corresponding to the ISO-8601 day...
date date(date dt)
Returns the date passed.
int get_years(date dt)
Returns an integer corresponding to the literal year value in the date (does not calculate a duration...
int getDayOfWeek(date dt)
Returns an integer representing the day of the week for the absolute date value passed (0=Sunday,...
int microsecond
(absolute and relative) The microsecond value of the date
Definition: ql_time.dox.h:19
hash< DateTimeInfo > date_info(date dt)
Returns a DateTimeInfo hash for the given date argument (can be either a relative or absolute date)
int dow
(absolute Only) The day of the week, where 0=Sunday, 1=Monday, ... 6=Saturday
Definition: ql_time.dox.h:11
int clock_getnanos()
Returns an integer representing the system time in nanoseconds (1/1000000000 second intervals) since ...
date/time information hash as returned by date_info() and <date>::info()
Definition: ql_time.dox.h:7
int get_months(date dt)
Returns an integer corresponding to the literal month value in the date (does not calculate a duratio...
int get_duration_microseconds(date dt)
Returns an integer value representing the the number of microseconds of duration in the value of the ...
float get_duration_seconds_f(date dt)
Returns a floating-point value representing the the number of seconds of duration in the value of the...
date now_us()
Returns the current date and time with a resolution to the microsecond.
int day
the ISO day value from 1 (Monday) to 7 (Sunday)
Definition: ql_time.dox.h:46
date getDateFromISOWeek(softint year, softint week, softint day=1)
Retuns an absolute date value for the ISO-8601 calendar week information passed (year,...
int mktime(date dt)
Returns the number of seconds of the date and time in local time passed since Jan 1,...
date get_midnight(date dt)
Returns midnight on the date passed (strips the time component on the new value)
int get_iso_day_of_week(date dt)
Returns an integer representing the ISO-8601 day of the week for the absolute date value passed (1=Mo...
int get_day_number(date dt)
Returns an integer representing the ordinal day number in the year (corresponding to the ISO-8601 day...
int doy
(absolute Only) The ordinal day number in the year
Definition: ql_time.dox.h:13
date now()
Returns the current date and time with a resolution to the second.
date gmtime()
Returns the current UTC (GMT) time with a resolution of a second.
Qore::TimeZone zone
(absolute Only) The time zone for the time
Definition: ql_time.dox.h:33
int week
the ISO week number
Definition: ql_time.dox.h:48
bool dst
(absolute Only) A flag if daylight savings time is in effect
Definition: ql_time.dox.h:15
int get_milliseconds(date dt)
Returns an integer corresponding to the literal millisecond value in the date (does not calculate a d...
int get_seconds(date dt)
Returns an integer corresponding to the literal second value in the date (does not calculate a durati...
date get_date_from_iso_week(softint year, softint week, softint day=1)
Retuns an absolute date value for the ISO-8601 calendar week information passed (year,...
int getISODayOfWeek(date dt)
Returns an integer representing the ISO-8601 day of the week for the absolute date value passed (1=Mo...
date now_ms()
Returns the current date and time with a resolution to the millisecond.
int minute
(absolute and relative) The minute value of the date
Definition: ql_time.dox.h:21
date milliseconds(softint ms)
Returns a relative date/time value in milliseconds based on the integer argument passed to be used in...
int utc_secs_east
(absolute Only) Offset from UTC in seconds east; if the time zone is west of UTC then the value will ...
Definition: ql_time.dox.h:29
hash< IsoWeekInfo > get_iso_week_hash(date dt)
Returns an IsoWeekInfo hash representing the ISO-8601 calendar week information for the absolute date...
date now_utc()
Returns the current UTC date and time with a resolution to the microsecond.
hash< IsoWeekInfo > getISOWeekHash(date dt)
Returns an IsoWeekInfo hash representing the ISO-8601 calendar week information for the absolute date...
int day
(absolute and relative) The day value of the date (day of the month for absolute dates)
Definition: ql_time.dox.h:9
int second
(absolute and relative) The second value of the date
Definition: ql_time.dox.h:27
date microseconds(softint us)
Returns a relative date/time value in microseconds based on the integer argument passed to be used in...
The TimeZone class provides access to time zone functionality.
Definition: QC_TimeZone.dox.h:11
date months(softint months)
Returns a relative date/time value in months based on the integer argument passed to be used in date ...
string getISOWeekString(date dt)
Returns a string representing the ISO-8601 calendar week information for the absolute date passed (ex...
bool is_date_absolute(date dt)
Returns True if the argument is an absolute date/time value, False if not.
int clock_getmillis()
Returns an integer representing the system time in milliseconds (1/1000 second intervals since Jan 1,...
bool is_date_relative(date dt)
Returns True if the argument is an relative date/time value, False if not.
string get_iso_week_string(date dt)
Returns a string representing the ISO-8601 calendar week information for the absolute date passed (ex...
int get_epoch_seconds(date dt)
Returns the number of seconds of the date and time in local time passed since Jan 1,...
int hour
(absolute and relative) The hour value of the date
Definition: ql_time.dox.h:17
ISO week information as returned by get_iso_week_hash() and <date>::isoWeekHash()
Definition: ql_time.dox.h:44
int get_minutes(date dt)
Returns an integer corresponding to the literal minute value in the date (does not calculate a durati...
date date_ms(softint ms)
Converts an integer argument representing the offset in milliseconds from January 1,...
int year
(absolute and relative) The year value of the date
Definition: ql_time.dox.h:31
date years(softint years)
Returns a relative date/time value in years based on the integer argument passed to be used in date a...
bool relative
(absolute and relative) True if the date is a relative date, False if it is absolute
Definition: ql_time.dox.h:25
string zone_name
(absolute Only) The name of the time zone for the given time (ex: "CEST" for Central European Summer ...
Definition: ql_time.dox.h:35
date hours(softint hours)
Returns a relative date/time value in hours based on the integer argument passed to be used in date a...
int get_day_of_week(date dt)
Returns an integer representing the day of the week for the absolute date value passed (0=Sunday,...
int get_days(date dt)
Returns an integer corresponding to the literal day value in the date (does not calculate a duration)
string format_date(string format, date dt)
Returns a formatted string for a date argument passed.
int month
(absolute and relative) The month value of the date
Definition: ql_time.dox.h:23
date days(softint days)
Returns a relative date/time value in days based on the integer argument passed to be used in date ar...
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:3
date localtime()
Returns the current date and time with a resolution to the second.
int year
the ISO year value (not always equal to the actual calendar year)
Definition: ql_time.dox.h:50
int get_duration_seconds(date dt)
Returns an integer value representing the the number of seconds of duration in the value of the date ...
date seconds(softint seconds)
Returns a relative date/time value in seconds based on the integer argument passed to be used in date...
int get_duration_milliseconds(date dt)
Returns an integer value representing the the number of milliseconds of duration in the value of the ...
date date_us(softint us)
Converts an integer argument representing the offset in microseconds from January 1,...
date minutes(softint minutes)
Returns a relative date/time value in minutes based on the integer argument passed to be used in date...
int clock_getmicros()
Returns an integer representing the system time in microseconds (1/1000000 second intervals) since Ja...
int timegm(date dt)
Returns the number of seconds since January 1, 1970 00:00:00 in the local time zone for the given dat...