Qore Programming Language Reference Manual  0.8.13.5
 All Classes Namespaces Functions Variables Groups Pages
ql_time.dox.h
1 namespace Qore {
4 
6 struct DateTimeInfo {
8  int day;
10  int dow;
12  int doy;
14  bool dst;
16  int hour;
20  int minute;
22  int month;
24  bool relative;
26  int second;
30  int year;
34  string zone_name;
35 };
36 };
38 namespace Qore {
40 
42 struct IsoWeekInfo {
44  int day;
46  int week;
48  int year;
49 };
50 };
51 
53 namespace Qore {
213 
215 
229 int clock_getmicros();
230 
232 
246 int clock_getmillis();
247 
249 
263 int clock_getnanos();
264 
266 
275 date date(date dt);
276 
278 
302 date date(string dtstr);
303 
305 
319 date date(softfloat f);
320 
322 
336 date date(int i);
337 
339 
346 date date();
347 
349 
356 date date(null null);
357 
359 
376 date date(string dtstr, string mask);
377 
379 
393 hash<DateTimeInfo> date_info(date dt);
394 
396 
406 hash<DateTimeInfo> date_info();
407 
409 
423 date date_ms(softint ms);
424 
426 
430 nothing date_ms();
431 
433 
447 date date_us(softint us);
448 
450 
471 date days(softint days);
472 
474 
478 nothing days();
479 
481 
497 string format_date(string format, date dt);
498 
500 
504 nothing format_date();
505 
507 
523 date getDateFromISOWeek(softint year, softint week, softint day = 1);
524 
526 
535 int getDayNumber(date dt);
536 
538 
542 nothing getDayNumber();
543 
545 
556 int getDayOfWeek(date dt);
557 
559 
563 nothing getDayOfWeek();
564 
566 
577 int getISODayOfWeek(date dt);
578 
580 
584 nothing getISODayOfWeek();
585 
587 
600 hash<IsoWeekInfo> getISOWeekHash(date dt);
601 
603 
607 nothing getISOWeekHash();
608 
610 
626 string getISOWeekString(date dt);
627 
629 
633 nothing getISOWeekString();
634 
636 
657 date get_date_from_iso_week(softint year, softint week, softint day = 1);
658 
660 
676 int get_day_number(date dt);
677 
679 
697 int get_day_of_week(date dt);
698 
700 
714 int get_days(date dt);
715 
717 
721 nothing get_days();
722 
724 
745 int get_duration_microseconds(date dt);
746 
748 
771 int get_duration_milliseconds(date dt);
772 
774 
798 int get_duration_seconds(date dt);
799 
801 
826 float get_duration_seconds_f(date dt);
827 
829 
845 int get_epoch_seconds(date dt);
846 
848 
852 nothing get_epoch_seconds();
853 
855 
869 int get_hours(date dt);
870 
872 
876 nothing get_hours();
877 
879 
897 int get_iso_day_of_week(date dt);
898 
900 
920 hash<IsoWeekInfo> get_iso_week_hash(date dt);
921 
923 
941 string get_iso_week_string(date dt);
942 
944 
960 int get_microseconds(date dt);
961 
963 
977 date get_midnight(date dt);
978 
980 
984 nothing get_midnight();
985 
987 
1003 int get_milliseconds(date dt);
1004 
1006 
1010 nothing get_milliseconds();
1011 
1013 
1027 int get_minutes(date dt);
1028 
1030 
1034 nothing get_minutes();
1035 
1037 
1051 int get_months(date dt);
1052 
1054 
1058 nothing get_months();
1059 
1061 
1077 int get_seconds(date dt);
1078 
1080 
1084 nothing get_seconds();
1085 
1087 
1101 int get_years(date dt);
1102 
1104 
1108 nothing get_years();
1109 
1111 
1125 date gmtime();
1126 
1128 
1143 date gmtime(softint secs, softint us = 0);
1144 
1146 
1160 date gmtime(date dt);
1161 
1163 
1184 date hours(softint hours);
1185 
1187 
1191 nothing hours();
1192 
1194 
1208 bool is_date_absolute(date dt);
1209 
1211 
1215 bool is_date_absolute();
1216 
1218 
1232 bool is_date_relative(date dt);
1233 
1235 
1239 bool is_date_relative();
1240 
1242 
1256 date localtime();
1257 
1259 
1274 date localtime(softint secs, softint us = 0);
1275 
1277 
1291 date localtime(date dt);
1292 
1294 
1315 date microseconds(softint us);
1316 
1318 
1339 date milliseconds(softint ms);
1340 
1342 
1346 nothing milliseconds();
1347 
1349 
1370 date minutes(softint minutes);
1371 
1373 
1377 nothing minutes();
1378 
1380 
1396 int mktime(date dt);
1397 
1399 
1403 nothing mktime();
1404 
1406 
1427 date months(softint months);
1428 
1430 
1434 nothing months();
1435 
1437 
1454 date now();
1455 
1457 
1474 date now_ms();
1475 
1477 
1494 date now_us();
1495 
1497 
1509 date now_utc();
1510 
1512 
1533 date seconds(softint seconds);
1534 
1536 
1540 nothing seconds();
1541 
1543 
1557 int timegm(date dt);
1558 
1560 
1564 nothing timegm();
1565 
1567 
1588 date years(softint years);
1589 
1591 
1595 nothing years();
1596 
1598 };
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:18
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:10
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:6
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:44
date getDateFromISOWeek(softint year, softint week, softint day=1)
Retuns an absolute date value for the ISO-8601 calendar week information passed (year, week number, optional: weekday, where 1=Monday, 7=Sunday) in the current time zone.
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:12
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:32
int week
the ISO week number
Definition: ql_time.dox.h:46
bool dst
(absolute Only) A flag if daylight savings time is in effect
Definition: ql_time.dox.h:14
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, week number, optional: weekday, where 1=Monday, 7=Sunday) in the current time zone.
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:20
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:28
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:8
int second
(absolute and relative) The second value of the date
Definition: ql_time.dox.h:26
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:6
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:16
ISO week information as returned by get_iso_week_hash() and <date>::isoWeekHash() ...
Definition: ql_time.dox.h:42
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:30
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:24
string zone_name
(absolute Only) The name of the time zone for the given time (ex: &quot;CEST&quot; for Central European Summer ...
Definition: ql_time.dox.h:34
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:22
date days(softint days)
Returns a relative date/time value in days based on the integer argument passed to be used in date ar...
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:48
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...