RexxDateTime.hpp File Reference
#include "RexxCore.h"
Include dependency graph for RexxDateTime.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  RexxDateTime
 

Macros

#define LEAPMONTH   29 /* days in a leap year February */
 
#define MAXCIVILHOURS   12 /* maximum hours in a civil time */
 
#define MAXHOURS   23 /* maximum hours in 24 hour clock */
 
#define MAXSECONDS   59 /* maximum seconds in time */
 
#define MAXMINUTES   59 /* maximum minutes in time */
 
#define HOURS_IN_DAY   24 /* hours in a day */
 
#define MINUTES_IN_HOUR   60 /* minutes in an hour */
 
#define SECONDS_IN_MINUTE   60 /* second in a minute */
 
#define MONTHS   12 /* months in a year */
 
#define SECONDS_IN_HOUR   (SECONDS_IN_MINUTE * MINUTES_IN_HOUR)
 
#define SECONDS_IN_DAY   (SECONDS_IN_HOUR * HOURS_IN_DAY)
 
#define MINUTES_IN_DAY   (MINUTES_IN_HOUR * HOURS_IN_DAY)
 
#define MICROSECONDS   1000000 /* microseconds in a second */
 
#define MICROSECONDS_IN_DAY   ((int64_t)SECONDS_IN_DAY * (int64_t)MICROSECONDS)
 
#define BASE_DAYS(year)   (((year) * 365) + ((year) / 4) - ((year) / 100) + ((year) / 400))
 
#define OLYMPIAD_DAYS   BASE_DAYS(400) /* days in a 400 year Olympiad */
 
#define CENTURY_DAYS   BASE_DAYS(100) /* days in a 100 year century */
 
#define LEAP_DAYS   BASE_DAYS(4) /* days in a 4 year leap cycle */
 
#define YEAR_DAYS   365 /* days in a normal year */
 
#define LEAP_CYCLE   4 /* years in a leap cycle */
 
#define CENTURY   100 /* years in a century */
 
#define OLYMPIAD   400 /* years in an Olympiad cycle */
 
#define MONTH_SIZE   2 /* size of a month date field */
 
#define DAY_SIZE   2 /* size of a day date field */
 
#define SHORT_YEAR   2 /* size of a 2 digit year field */
 
#define LONG_YEAR   4 /* size of a 4 digit year field */
 
#define CHAR_MONTH   3 /* size of the character month field */
 
#define HOURS_SIZE   2 /* size of an hours field */
 
#define MINUTES_SIZE   2 /* size of a minutes field */
 
#define SECONDS_SIZE   2 /* size of a seconds field */
 
#define MICRO_SIZE   6 /* size of micro seconds field */
 
#define PAST_THRESHOLD   50 /* past threshold for 2 digit years */
 
#define FUTURE_THRESHOLD   49 /* future threshold for 2 digit years*/
 
#define POSTMERIDIAN   "pm" /* "pm" spec of civil time */
 
#define ANTEMERIDIAN   "am" /* "am" spec of civil time */
 
#define LeapYear(year)   ((!(year % LEAP_CYCLE)) && ((year % CENTURY) || (!(year % OLYMPIAD))))
 
#define JANUARY   1 /* positions of the months */
 
#define FEBRUARY   2
 
#define MARCH   3
 
#define APRIL   4
 
#define MAY   5
 
#define JUNE   6
 
#define JULY   7
 
#define AUGUST   8
 
#define SEPTEMBER   9
 
#define OCTOBER   10
 
#define NOVEMBER   11
 
#define DECEMBER   12
 

Macro Definition Documentation

◆ ANTEMERIDIAN

#define ANTEMERIDIAN   "am" /* "am" spec of civil time */

Definition at line 92 of file RexxDateTime.hpp.

◆ APRIL

#define APRIL   4

Definition at line 99 of file RexxDateTime.hpp.

◆ AUGUST

#define AUGUST   8

Definition at line 103 of file RexxDateTime.hpp.

◆ BASE_DAYS

#define BASE_DAYS (   year)    (((year) * 365) + ((year) / 4) - ((year) / 100) + ((year) / 400))

Definition at line 68 of file RexxDateTime.hpp.

◆ CENTURY

#define CENTURY   100 /* years in a century */

Definition at line 75 of file RexxDateTime.hpp.

◆ CENTURY_DAYS

#define CENTURY_DAYS   BASE_DAYS(100) /* days in a 100 year century */

Definition at line 71 of file RexxDateTime.hpp.

◆ CHAR_MONTH

#define CHAR_MONTH   3 /* size of the character month field */

Definition at line 83 of file RexxDateTime.hpp.

◆ DAY_SIZE

#define DAY_SIZE   2 /* size of a day date field */

Definition at line 80 of file RexxDateTime.hpp.

◆ DECEMBER

#define DECEMBER   12

Definition at line 107 of file RexxDateTime.hpp.

◆ FEBRUARY

#define FEBRUARY   2

Definition at line 97 of file RexxDateTime.hpp.

◆ FUTURE_THRESHOLD

#define FUTURE_THRESHOLD   49 /* future threshold for 2 digit years*/

Definition at line 90 of file RexxDateTime.hpp.

◆ HOURS_IN_DAY

#define HOURS_IN_DAY   24 /* hours in a day */

Definition at line 55 of file RexxDateTime.hpp.

◆ HOURS_SIZE

#define HOURS_SIZE   2 /* size of an hours field */

Definition at line 84 of file RexxDateTime.hpp.

◆ JANUARY

#define JANUARY   1 /* positions of the months */

Definition at line 96 of file RexxDateTime.hpp.

◆ JULY

#define JULY   7

Definition at line 102 of file RexxDateTime.hpp.

◆ JUNE

#define JUNE   6

Definition at line 101 of file RexxDateTime.hpp.

◆ LEAP_CYCLE

#define LEAP_CYCLE   4 /* years in a leap cycle */

Definition at line 74 of file RexxDateTime.hpp.

◆ LEAP_DAYS

#define LEAP_DAYS   BASE_DAYS(4) /* days in a 4 year leap cycle */

Definition at line 72 of file RexxDateTime.hpp.

◆ LEAPMONTH

#define LEAPMONTH   29 /* days in a leap year February */

Definition at line 50 of file RexxDateTime.hpp.

◆ LeapYear

#define LeapYear (   year)    ((!(year % LEAP_CYCLE)) && ((year % CENTURY) || (!(year % OLYMPIAD))))

Definition at line 94 of file RexxDateTime.hpp.

◆ LONG_YEAR

#define LONG_YEAR   4 /* size of a 4 digit year field */

Definition at line 82 of file RexxDateTime.hpp.

◆ MARCH

#define MARCH   3

Definition at line 98 of file RexxDateTime.hpp.

◆ MAXCIVILHOURS

#define MAXCIVILHOURS   12 /* maximum hours in a civil time */

Definition at line 51 of file RexxDateTime.hpp.

◆ MAXHOURS

#define MAXHOURS   23 /* maximum hours in 24 hour clock */

Definition at line 52 of file RexxDateTime.hpp.

◆ MAXMINUTES

#define MAXMINUTES   59 /* maximum minutes in time */

Definition at line 54 of file RexxDateTime.hpp.

◆ MAXSECONDS

#define MAXSECONDS   59 /* maximum seconds in time */

Definition at line 53 of file RexxDateTime.hpp.

◆ MAY

#define MAY   5

Definition at line 100 of file RexxDateTime.hpp.

◆ MICRO_SIZE

#define MICRO_SIZE   6 /* size of micro seconds field */

Definition at line 87 of file RexxDateTime.hpp.

◆ MICROSECONDS

#define MICROSECONDS   1000000 /* microseconds in a second */

Definition at line 64 of file RexxDateTime.hpp.

◆ MICROSECONDS_IN_DAY

#define MICROSECONDS_IN_DAY   ((int64_t)SECONDS_IN_DAY * (int64_t)MICROSECONDS)

Definition at line 65 of file RexxDateTime.hpp.

◆ MINUTES_IN_DAY

#define MINUTES_IN_DAY   (MINUTES_IN_HOUR * HOURS_IN_DAY)

Definition at line 63 of file RexxDateTime.hpp.

◆ MINUTES_IN_HOUR

#define MINUTES_IN_HOUR   60 /* minutes in an hour */

Definition at line 56 of file RexxDateTime.hpp.

◆ MINUTES_SIZE

#define MINUTES_SIZE   2 /* size of a minutes field */

Definition at line 85 of file RexxDateTime.hpp.

◆ MONTH_SIZE

#define MONTH_SIZE   2 /* size of a month date field */

Definition at line 79 of file RexxDateTime.hpp.

◆ MONTHS

#define MONTHS   12 /* months in a year */

Definition at line 58 of file RexxDateTime.hpp.

◆ NOVEMBER

#define NOVEMBER   11

Definition at line 106 of file RexxDateTime.hpp.

◆ OCTOBER

#define OCTOBER   10

Definition at line 105 of file RexxDateTime.hpp.

◆ OLYMPIAD

#define OLYMPIAD   400 /* years in an Olympiad cycle */

Definition at line 76 of file RexxDateTime.hpp.

◆ OLYMPIAD_DAYS

#define OLYMPIAD_DAYS   BASE_DAYS(400) /* days in a 400 year Olympiad */

Definition at line 70 of file RexxDateTime.hpp.

◆ PAST_THRESHOLD

#define PAST_THRESHOLD   50 /* past threshold for 2 digit years */

Definition at line 89 of file RexxDateTime.hpp.

◆ POSTMERIDIAN

#define POSTMERIDIAN   "pm" /* "pm" spec of civil time */

Definition at line 91 of file RexxDateTime.hpp.

◆ SECONDS_IN_DAY

#define SECONDS_IN_DAY   (SECONDS_IN_HOUR * HOURS_IN_DAY)

Definition at line 62 of file RexxDateTime.hpp.

◆ SECONDS_IN_HOUR

#define SECONDS_IN_HOUR   (SECONDS_IN_MINUTE * MINUTES_IN_HOUR)

Definition at line 60 of file RexxDateTime.hpp.

◆ SECONDS_IN_MINUTE

#define SECONDS_IN_MINUTE   60 /* second in a minute */

Definition at line 57 of file RexxDateTime.hpp.

◆ SECONDS_SIZE

#define SECONDS_SIZE   2 /* size of a seconds field */

Definition at line 86 of file RexxDateTime.hpp.

◆ SEPTEMBER

#define SEPTEMBER   9

Definition at line 104 of file RexxDateTime.hpp.

◆ SHORT_YEAR

#define SHORT_YEAR   2 /* size of a 2 digit year field */

Definition at line 81 of file RexxDateTime.hpp.

◆ YEAR_DAYS

#define YEAR_DAYS   365 /* days in a normal year */

Definition at line 73 of file RexxDateTime.hpp.