| Qore Programming Language Reference Manual 1.0.8

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;
19 int microsecond;
21 int minute;
23 int month;
25 bool relative;
27 int second;
29 int utc_secs_east;
31 int year;
33 Qore::TimeZone zone;
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 {
257
259
274 int clock_getmicros();
275
277
291 int clock_getmillis();
292
294
308 int clock_getnanos();
309
311
320 date date(date dt);
321
323
347 date date(string dtstr);
348
350
364 date date(softfloat f);
365
367
381 date date(int i);
382
384
391 date date();
392
394
401 date date(null null);
402
404
421 date date(string dtstr, string mask);
422
424
438 hash<DateTimeInfo> date_info(date dt);
439
441
451 hash<DateTimeInfo> date_info();
452
454
468 date date_ms(softint ms);
469
471
475 nothing date_ms();
476
478
492 date date_us(softint us);
493
495
516 date days(softint days);
517
519
523 nothing days();
524
526
542 string format_date(string format, date dt);
543
545
549 nothing format_date();
550
552
568 date getDateFromISOWeek(softint year, softint week, softint day = 1);
569
571
580 int getDayNumber(date dt);
581
583
587 nothing getDayNumber();
588
590
601 int getDayOfWeek(date dt);
602
604
608 nothing getDayOfWeek();
609
611
622 int getISODayOfWeek(date dt);
623
625
629 nothing getISODayOfWeek();
630
632
645 hash<IsoWeekInfo> getISOWeekHash(date dt);
646
648
652 nothing getISOWeekHash();
653
655
671 string getISOWeekString(date dt);
672
674
678 nothing getISOWeekString();
679
681
702 date get_date_from_iso_week(softint year, softint week, softint day = 1);
703
705
721 int get_day_number(date dt);
722
724
742 int get_day_of_week(date dt);
743
745
759 int get_days(date dt);
760
762
766 nothing get_days();
767
769
790 int get_duration_microseconds(date dt);
791
793
816 int get_duration_milliseconds(date dt);
817
819
843 int get_duration_seconds(date dt);
844
846
871 float get_duration_seconds_f(date dt);
872
874
890 int get_epoch_seconds(date dt);
891
893
897 nothing get_epoch_seconds();
898
900
914 int get_hours(date dt);
915
917
921 nothing get_hours();
922
924
942 int get_iso_day_of_week(date dt);
943
945
965 hash<IsoWeekInfo> get_iso_week_hash(date dt);
966
968
986 string get_iso_week_string(date dt);
987
989
1005 int get_microseconds(date dt);
1006
1008
1022 date get_midnight(date dt);
1023
1025
1029 nothing get_midnight();
1030
1032
1048 int get_milliseconds(date dt);
1049
1051
1055 nothing get_milliseconds();
1056
1058
1072 int get_minutes(date dt);
1073
1075
1079 nothing get_minutes();
1080
1082
1096 int get_months(date dt);
1097
1099
1103 nothing get_months();
1104
1106
1122 int get_seconds(date dt);
1123
1125
1129 nothing get_seconds();
1130
1132
1146 int get_years(date dt);
1147
1149
1153 nothing get_years();
1154
1156
1170 date gmtime();
1171
1173
1188 date gmtime(softint secs, softint us = 0);
1189
1191
1205 date gmtime(date dt);
1206
1208
1229 date hours(softint hours);
1230
1232
1236 nothing hours();
1237
1239
1253 bool is_date_absolute(date dt);
1254
1256
1260 bool is_date_absolute();
1261
1263
1277 bool is_date_relative(date dt);
1278
1280
1284 bool is_date_relative();
1285
1287
1301 date localtime();
1302
1304
1319 date localtime(softint secs, softint us = 0);
1320
1322
1336 date localtime(date dt);
1337
1339
1360 date microseconds(softint us);
1361
1363
1384 date milliseconds(softint ms);
1385
1387
1391 nothing milliseconds();
1392
1394
1415 date minutes(softint minutes);
1416
1418
1422 nothing minutes();
1423
1425
1441 int mktime(date dt);
1442
1444
1448 nothing mktime();
1449
1451
1472 date months(softint months);
1473
1475
1479 nothing months();
1480
1482
1499 date now();
1500
1502
1519 date now_ms();
1520
1522
1539 date now_us();
1540
1542
1554 date now_utc();
1555
1557
1578 date seconds(softint seconds);
1579
1581
1585 nothing seconds();
1586
1588
1602 int timegm(date dt);
1603
1605
1609 nothing timegm();
1610
1612
1633 date years(softint years);
1634
1636
1640 nothing years();
1641
1643 }
Qore::get_hours
int get_hours(date dt)
Returns an integer corresponding to the literal hour value in the date (does not calculate a duration...
Qore::get_microseconds
int get_microseconds(date dt)
Returns an integer corresponding to the literal microsecond value in the date (does not calculate a d...
Qore::getDayNumber
int getDayNumber(date dt)
Returns an integer representing the ordinal day number in the year (corresponding to the ISO-8601 day...
Qore::date
date date(date dt)
Returns the date passed.
Qore::get_years
int get_years(date dt)
Returns an integer corresponding to the literal year value in the date (does not calculate a duration...
Qore::getDayOfWeek
int getDayOfWeek(date dt)
Returns an integer representing the day of the week for the absolute date value passed (0=Sunday...
Qore::DateTimeInfo::microsecond
int microsecond
(absolute and relative) The microsecond value of the date
Definition: ql_time.dox.h:19
Qore::date_info
hash< DateTimeInfo > date_info(date dt)
Returns a DateTimeInfo hash for the given date argument (can be either a relative or absolute date) ...
Qore::DateTimeInfo::dow
int dow
(absolute Only) The day of the week, where 0=Sunday, 1=Monday, ... 6=Saturday
Definition: ql_time.dox.h:11
Qore::clock_getnanos
int clock_getnanos()
Returns an integer representing the system time in nanoseconds (1/1000000000 second intervals) since ...
Qore::DateTimeInfo
date/time information hash as returned by date_info() and <date>::info() ...
Definition: ql_time.dox.h:7
Qore::get_months
int get_months(date dt)
Returns an integer corresponding to the literal month value in the date (does not calculate a duratio...
Qore::get_duration_microseconds
int get_duration_microseconds(date dt)
Returns an integer value representing the the number of microseconds of duration in the value of the ...
Qore::get_duration_seconds_f
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...
Qore::now_us
date now_us()
Returns the current date and time with a resolution to the microsecond.
Qore::IsoWeekInfo::day
int day
the ISO day value from 1 (Monday) to 7 (Sunday)
Definition: ql_time.dox.h:46
Qore::getDateFromISOWeek
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.
Qore::mktime
int mktime(date dt)
Returns the number of seconds of the date and time in local time passed since Jan 1...
Qore::get_midnight
date get_midnight(date dt)
Returns midnight on the date passed (strips the time component on the new value)
Qore::get_iso_day_of_week
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...
Qore::get_day_number
int get_day_number(date dt)
Returns an integer representing the ordinal day number in the year (corresponding to the ISO-8601 day...
Qore::DateTimeInfo::doy
int doy
(absolute Only) The ordinal day number in the year
Definition: ql_time.dox.h:13
Qore::now
date now()
Returns the current date and time with a resolution to the second.
Qore::gmtime
date gmtime()
Returns the current UTC (GMT) time with a resolution of a second.
Qore::DateTimeInfo::zone
Qore::TimeZone zone
(absolute Only) The time zone for the time
Definition: ql_time.dox.h:33
Qore::IsoWeekInfo::week
int week
the ISO week number
Definition: ql_time.dox.h:48
Qore::DateTimeInfo::dst
bool dst
(absolute Only) A flag if daylight savings time is in effect
Definition: ql_time.dox.h:15
Qore::get_milliseconds
int get_milliseconds(date dt)
Returns an integer corresponding to the literal millisecond value in the date (does not calculate a d...
Qore::get_seconds
int get_seconds(date dt)
Returns an integer corresponding to the literal second value in the date (does not calculate a durati...
Qore::get_date_from_iso_week
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.
Qore::getISODayOfWeek
int getISODayOfWeek(date dt)
Returns an integer representing the ISO-8601 day of the week for the absolute date value passed (1=Mo...
Qore::now_ms
date now_ms()
Returns the current date and time with a resolution to the millisecond.
Qore::DateTimeInfo::minute
int minute
(absolute and relative) The minute value of the date
Definition: ql_time.dox.h:21
Qore::milliseconds
date milliseconds(softint ms)
Returns a relative date/time value in milliseconds based on the integer argument passed to be used in...
Qore::DateTimeInfo::utc_secs_east
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
Qore::get_iso_week_hash
hash< IsoWeekInfo > get_iso_week_hash(date dt)
Returns an IsoWeekInfo hash representing the ISO-8601 calendar week information for the absolute date...
Qore::now_utc
date now_utc()
Returns the current UTC date and time with a resolution to the microsecond.
Qore::getISOWeekHash
hash< IsoWeekInfo > getISOWeekHash(date dt)
Returns an IsoWeekInfo hash representing the ISO-8601 calendar week information for the absolute date...
Qore::DateTimeInfo::day
int day
(absolute and relative) The day value of the date (day of the month for absolute dates) ...
Definition: ql_time.dox.h:9
Qore::DateTimeInfo::second
int second
(absolute and relative) The second value of the date
Definition: ql_time.dox.h:27
Qore::microseconds
date microseconds(softint us)
Returns a relative date/time value in microseconds based on the integer argument passed to be used in...
Qore::TimeZone
The TimeZone class provides access to time zone functionality.
Definition: QC_TimeZone.dox.h:11
Qore::months
date months(softint months)
Returns a relative date/time value in months based on the integer argument passed to be used in date ...
Qore::getISOWeekString
string getISOWeekString(date dt)
Returns a string representing the ISO-8601 calendar week information for the absolute date passed (ex...
Qore::is_date_absolute
bool is_date_absolute(date dt)
Returns True if the argument is an absolute date/time value, False if not.
Qore::clock_getmillis
int clock_getmillis()
Returns an integer representing the system time in milliseconds (1/1000 second intervals since Jan 1...
Qore::is_date_relative
bool is_date_relative(date dt)
Returns True if the argument is an relative date/time value, False if not.
Qore::get_iso_week_string
string get_iso_week_string(date dt)
Returns a string representing the ISO-8601 calendar week information for the absolute date passed (ex...
Qore::get_epoch_seconds
int get_epoch_seconds(date dt)
Returns the number of seconds of the date and time in local time passed since Jan 1...
Qore::DateTimeInfo::hour
int hour
(absolute and relative) The hour value of the date
Definition: ql_time.dox.h:17
Qore::IsoWeekInfo
ISO week information as returned by get_iso_week_hash() and <date>::isoWeekHash() ...
Definition: ql_time.dox.h:44
Qore::get_minutes
int get_minutes(date dt)
Returns an integer corresponding to the literal minute value in the date (does not calculate a durati...
Qore::date_ms
date date_ms(softint ms)
Converts an integer argument representing the offset in milliseconds from January 1...
Qore::DateTimeInfo::year
int year
(absolute and relative) The year value of the date
Definition: ql_time.dox.h:31
Qore::years
date years(softint years)
Returns a relative date/time value in years based on the integer argument passed to be used in date a...
Qore::DateTimeInfo::relative
bool relative
(absolute and relative) True if the date is a relative date, False if it is absolute ...
Definition: ql_time.dox.h:25
Qore::DateTimeInfo::zone_name
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
Qore::hours
date hours(softint hours)
Returns a relative date/time value in hours based on the integer argument passed to be used in date a...
Qore::get_day_of_week
int get_day_of_week(date dt)
Returns an integer representing the day of the week for the absolute date value passed (0=Sunday...
Qore::get_days
int get_days(date dt)
Returns an integer corresponding to the literal day value in the date (does not calculate a duration)...
Qore::format_date
string format_date(string format, date dt)
Returns a formatted string for a date argument passed.
Qore::DateTimeInfo::month
int month
(absolute and relative) The month value of the date
Definition: ql_time.dox.h:23
Qore::days
date days(softint days)
Returns a relative date/time value in days based on the integer argument passed to be used in date ar...
Qore
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:3
Qore::localtime
date localtime()
Returns the current date and time with a resolution to the second.
Qore::IsoWeekInfo::year
int year
the ISO year value (not always equal to the actual calendar year)
Definition: ql_time.dox.h:50
Qore::get_duration_seconds
int get_duration_seconds(date dt)
Returns an integer value representing the the number of seconds of duration in the value of the date ...
Qore::seconds
date seconds(softint seconds)
Returns a relative date/time value in seconds based on the integer argument passed to be used in date...
Qore::get_duration_milliseconds
int get_duration_milliseconds(date dt)
Returns an integer value representing the the number of milliseconds of duration in the value of the ...
Qore::date_us
date date_us(softint us)
Converts an integer argument representing the offset in microseconds from January 1...
Qore::minutes
date minutes(softint minutes)
Returns a relative date/time value in minutes based on the integer argument passed to be used in date...
Qore::clock_getmicros
int clock_getmicros()
Returns an integer representing the system time in microseconds (1/1000000 second intervals) since Ja...
Qore::timegm
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...