| Qore Programming Language Reference Manual 2.2.0

Loading...
Searching...
No Matches
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 {
263
265
279 int clock_getmicros();
280
282
296 int clock_getmillis();
297
299
313 int clock_getnanos();
314
316
325 date date(date dt);
326
328
352 date date(string dtstr);
353
355
369 date date(softfloat f);
370
372
386 date date(int i);
387
389
396 date date();
397
399
406 date date(null null);
407
409
426 date date(string dtstr, string mask);
427
429
443 hash<DateTimeInfo> date_info(date dt);
444
446
456 hash<DateTimeInfo> date_info();
457
459
473 date date_ms(softint ms);
474
476
480nothing date_ms();
481
483
497 date date_us(softint us);
498
500
521 date days(softint days);
522
524
528nothing days();
529
531
547 string format_date(string format, date dt);
548
550
554nothing format_date();
555
557
573 date getDateFromISOWeek(softint year, softint week, softint day = 1);
574
576
585 int getDayNumber(date dt);
586
588
592nothing getDayNumber();
593
595
606 int getDayOfWeek(date dt);
607
609
613nothing getDayOfWeek();
614
616
627 int getISODayOfWeek(date dt);
628
630
634nothing getISODayOfWeek();
635
637
650 hash<IsoWeekInfo> getISOWeekHash(date dt);
651
653
657nothing getISOWeekHash();
658
660
676 string getISOWeekString(date dt);
677
679
683nothing getISOWeekString();
684
686
707 date get_date_from_iso_week(softint year, softint week, softint day = 1);
708
710
726 int get_day_number(date dt);
727
729
747 int get_day_of_week(date dt);
748
750
764 int get_days(date dt);
765
767
771nothing get_days();
772
774
795 int get_duration_microseconds(date dt);
796
798
821 int get_duration_milliseconds(date dt);
822
824
848 int get_duration_seconds(date dt);
849
851
876 float get_duration_seconds_f(date dt);
877
879
894 int get_epoch_microseconds(date dt);
895
897
912 int get_epoch_milliseconds(date dt);
913
915
931 int get_epoch_seconds(date dt);
932
934
940nothing get_epoch_seconds();
941
943
957 int get_hours(date dt);
958
960
964nothing get_hours();
965
967
985 int get_iso_day_of_week(date dt);
986
988
1008 hash<IsoWeekInfo> get_iso_week_hash(date dt);
1009
1011
1029 string get_iso_week_string(date dt);
1030
1032
1048 int get_microseconds(date dt);
1049
1051
1065 date get_midnight(date dt);
1066
1068
1072nothing get_midnight();
1073
1075
1091 int get_milliseconds(date dt);
1092
1094
1098nothing get_milliseconds();
1099
1101
1115 int get_minutes(date dt);
1116
1118
1122nothing get_minutes();
1123
1125
1139 int get_months(date dt);
1140
1142
1146nothing get_months();
1147
1149
1165 int get_seconds(date dt);
1166
1168
1172nothing get_seconds();
1173
1175
1189 int get_years(date dt);
1190
1192
1196nothing get_years();
1197
1199
1213 date gmtime();
1214
1216
1231 date gmtime(softint secs, softint us = 0);
1232
1234
1248 date gmtime(date dt);
1249
1251
1272 date hours(softint hours);
1273
1275
1279nothing hours();
1280
1282
1296 bool is_date_absolute(date dt);
1297
1299
1303 bool is_date_absolute();
1304
1306
1320 bool is_date_relative(date dt);
1321
1323
1327 bool is_date_relative();
1328
1330
1344 date localtime();
1345
1347
1362 date localtime(softint secs, softint us = 0);
1363
1365
1379 date localtime(date dt);
1380
1382
1403 date microseconds(softint us);
1404
1406
1427 date milliseconds(softint ms);
1428
1430
1434nothing milliseconds();
1435
1437
1458 date minutes(softint minutes);
1459
1461
1465nothing minutes();
1466
1468
1484 int mktime(date dt);
1485
1487
1491nothing mktime();
1492
1494
1515 date months(softint months);
1516
1518
1522nothing months();
1523
1525
1542 date now();
1543
1545
1562 date now_ms();
1563
1565
1582 date now_us();
1583
1585
1597 date now_utc();
1598
1600
1621 date seconds(softint seconds);
1622
1624
1628nothing seconds();
1629
1631
1645 int timegm(date dt);
1646
1648
1652nothing timegm();
1653
1655
1676 date years(softint years);
1677
1679
1683nothing years();
1684
1686}
Qore::TimeZone
The TimeZone class provides access to time zone functionality.
Definition QC_TimeZone.dox.h:11
Qore::now_utc
date now_utc()
Returns the current UTC date and time with a resolution to the microsecond.
Qore::gmtime
date gmtime()
Returns the current UTC (GMT) time with a resolution of a second.
Qore::days
nothing days()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
Qore::months
nothing months()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
Qore::getDayOfWeek
nothing getDayOfWeek()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
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::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,...
Qore::get_midnight
nothing get_midnight()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
Qore::minutes
nothing minutes()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
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::is_date_absolute
bool is_date_absolute()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
Qore::date
date date()
This function just returns 1970-01-01Z.
Qore::get_milliseconds
nothing get_milliseconds()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
Qore::years
nothing years()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
Qore::getISODayOfWeek
nothing getISODayOfWeek()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
Qore::now
date now()
Returns the current date and time with a resolution to the second.
Qore::clock_getmillis
int clock_getmillis()
Returns an integer representing the system time in milliseconds (1/1000 second intervals since Jan 1,...
Qore::timegm
nothing timegm()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
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::getDayNumber
nothing getDayNumber()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
Qore::format_date
nothing format_date()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
Qore::now_ms
date now_ms()
Returns the current date and time with a resolution to the millisecond.
Qore::date_ms
nothing date_ms()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
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::get_months
nothing get_months()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
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::now_us
date now_us()
Returns the current date and time with a resolution to the microsecond.
Qore::get_epoch_microseconds
int get_epoch_microseconds(date dt)
Returns the number of microseconds of the date and time in local time passed since Jan 1,...
Qore::getISOWeekHash
nothing getISOWeekHash()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
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::getISOWeekString
nothing getISOWeekString()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
Qore::hours
nothing hours()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
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::is_date_relative
bool is_date_relative()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
Qore::clock_getmicros
int clock_getmicros()
Returns an integer representing the system time in microseconds (1/1000000 second intervals) since Ja...
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,...
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::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::date_us
date date_us(softint us)
Converts an integer argument representing the offset in microseconds from January 1,...
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::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::get_minutes
nothing get_minutes()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
Qore::localtime
date localtime()
Returns the current date and time with a resolution to the second.
Qore::mktime
nothing mktime()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
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::date
date date(date dt)
Returns the date passed.
Qore::get_seconds
nothing get_seconds()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
Qore::milliseconds
nothing milliseconds()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
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_epoch_milliseconds
int get_epoch_milliseconds(date dt)
Returns the number of milliseconds of the date and time in local time passed since Jan 1,...
Qore::get_days
nothing get_days()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
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::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::get_years
nothing get_years()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
Qore::get_hours
nothing get_hours()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
Qore::seconds
nothing seconds()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
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::date_info
hash< DateTimeInfo > date_info()
Returns a DateTimeInfo hash for the current date and time.
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::get_epoch_seconds
nothing get_epoch_seconds()
This function variant does nothing at all.
Qore::clock_getnanos
int clock_getnanos()
Returns an integer representing the system time in nanoseconds (1/1000000000 second intervals) since ...
Qore::hash
hash< auto > hash(object obj)
Returns a hash of an object's members.
Qore
main Qore-language namespace
Definition Pseudo_QC_All.dox.h:3
Qore::DateTimeInfo
date/time information hash as returned by date_info() and <date>::info()
Definition ql_time.dox.h:7
Qore::DateTimeInfo::dst
bool dst
(absolute Only) A flag if daylight savings time is in effect
Definition ql_time.dox.h:15
Qore::DateTimeInfo::doy
int doy
(absolute Only) The ordinal day number in the year
Definition ql_time.dox.h:13
Qore::DateTimeInfo::zone
Qore::TimeZone zone
(absolute Only) The time zone for the time
Definition ql_time.dox.h:33
Qore::DateTimeInfo::hour
int hour
(absolute and relative) The hour value of the date
Definition ql_time.dox.h:17
Qore::DateTimeInfo::minute
int minute
(absolute and relative) The minute value of the date
Definition ql_time.dox.h:21
Qore::DateTimeInfo::second
int second
(absolute and relative) The second value of the date
Definition ql_time.dox.h:27
Qore::DateTimeInfo::month
int month
(absolute and relative) The month value of the date
Definition ql_time.dox.h:23
Qore::DateTimeInfo::microsecond
int microsecond
(absolute and relative) The microsecond value of the date
Definition ql_time.dox.h:19
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::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::DateTimeInfo::year
int year
(absolute and relative) The year value of the date
Definition ql_time.dox.h:31
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::dow
int dow
(absolute Only) The day of the week, where 0=Sunday, 1=Monday, ... 6=Saturday
Definition ql_time.dox.h:11
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::IsoWeekInfo
ISO week information as returned by get_iso_week_hash() and <date>::isoWeekHash()
Definition ql_time.dox.h:44
Qore::IsoWeekInfo::day
int day
the ISO day value from 1 (Monday) to 7 (Sunday)
Definition ql_time.dox.h:46
Qore::IsoWeekInfo::week
int week
the ISO week number
Definition ql_time.dox.h:48
Qore::IsoWeekInfo::year
int year
the ISO year value (not always equal to the actual calendar year)
Definition ql_time.dox.h:50