Classes | |
| class | clock_time |
| A specific point in time as represented by a 24 hour clock. More... | |
| class | day_in_year |
| An object that represents a particular day in a year. More... | |
| class | time_locus |
| An object that represents a particular point in time. More... | |
Enumerations | |
| enum | days { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY } |
| enum | months { JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER } |
| enum | time_zones { LOCAL_ZONE, GREENWICH_ZONE } |
| An enumeration of time zones, both relative and absolute. More... | |
Functions | |
| int | limit_day_of_month (int &day, int days_in_month, int days_in_prev_month) |
| time_locus | convert (const tm &to_convert, int ms) |
| time_locus | now () |
| returns our current locus in the time continuum. | |
| time_locus | greenwich_now () |
| returns Greenwich Mean Time (their now). | |
| clock_time | time_now () |
| what time is it? | |
| days | day_now () |
| Returns the current local day. | |
| months | month_now () |
| returns the local month. | |
| int | year_now () |
| what year is it? | |
| day_in_year | date_now () |
| what day on the calendar is it? | |
| const char * | day_name (days to_name) |
| Returns the name of the day "to_name". | |
| const char * | month_name (months to_name) |
| Returns the name of the month "to_name". | |
| const char * | short_month_name (months to_name) |
| Returns a shorter, constant-length (3 characters) month name. | |
| bool | set_time (const time_locus &new_time) |
| makes the current time equal to "new_time". | |
Variables | |
| const int | days_in_month [12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } |
| The number of days in each month in the standard year. | |
| const int | leap_days_in_month [12] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } |
| The number of days in each month in a leap year. | |
| const int | julian_days_in_month [12] = { 31, 29, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30 } |
| Number of days in each month based on the julian calendar. | |
| const int | julian_leap_days_in_month [12] = { 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30 } |
| Number of days in each month of a leap year in the julian calendar. | |
| const int | days_in_month [12] |
| The number of days in each month in the standard year. | |
| const int | leap_days_in_month [12] |
| The number of days in each month in a leap year. | |
| const int | julian_days_in_month [12] |
| Number of days in each month based on the julian calendar. | |
| const int | julian_leap_days_in_month [12] |
| Number of days in each month of a leap year in the julian calendar. | |
| const int | SECONDS_IN_MINUTE = 60 |
| Number of seconds in one minute. | |
| const int | MINUTES_IN_HOUR = 60 |
| Number of minutes in an hour. | |
| const int | HOURS_IN_DAY = 24 |
| Number of hours in a day. | |
| const int | DAYS_IN_YEAR = 365 |
| Number of days in a standard year. | |
| const int | LEAP_DAYS_IN_YEAR = 366 |
| Number of days in a leap year. | |
| const double | APPROX_DAYS_IN_YEAR = 365.2424 |
| A more accurate measure of the number of days in a year. | |
It is based on the Gregorian calendar currently in use by the USA and other countries.
| enum earth_time::days |
Definition at line 28 of file earth_time.h.
| enum earth_time::months |
Definition at line 36 of file earth_time.h.
An enumeration of time zones, both relative and absolute.
| LOCAL_ZONE | The time zone this computer is configured to report. |
| GREENWICH_ZONE | The time zone of Greenwich Mean Time. |
Definition at line 68 of file earth_time.h.
| time_locus earth_time::convert | ( | const tm & | to_convert, | |
| int | ms | |||
| ) |
Definition at line 308 of file earth_time.cpp.
References earth_time::day_in_year::day_in_month, earth_time::day_in_year::day_of_week, earth_time::day_in_year::day_of_year, earth_time::clock_time::hour, earth_time::clock_time::microsecond, earth_time::clock_time::millisecond, earth_time::clock_time::minute, earth_time::day_in_year::month, earth_time::clock_time::second, and earth_time::time_locus::year.
Referenced by octopus_request_id::from_text(), greenwich_now(), now(), run_test_18(), run_test_24(), version::v_build(), version::v_major(), version::v_minor(), and version::v_revision().
| day_in_year earth_time::date_now | ( | ) |
what day on the calendar is it?
Definition at line 351 of file earth_time.cpp.
References now().
Referenced by run_test_27().
| const char * earth_time::day_name | ( | days | to_name | ) |
Returns the name of the day "to_name".
Definition at line 353 of file earth_time.cpp.
References FRIDAY, MONDAY, SATURDAY, SUNDAY, THURSDAY, TUESDAY, and WEDNESDAY.
Referenced by earth_time::day_in_year::text_form().
| days earth_time::day_now | ( | ) |
Returns the current local day.
Definition at line 345 of file earth_time.cpp.
References earth_time::day_in_year::day_of_week, and now().
| time_locus earth_time::greenwich_now | ( | ) |
returns Greenwich Mean Time (their now).
Definition at line 335 of file earth_time.cpp.
References convert().
| int earth_time::limit_day_of_month | ( | int & | day, | |
| int | days_in_month, | |||
| int | days_in_prev_month | |||
| ) |
| const char * earth_time::month_name | ( | months | to_name | ) |
| months earth_time::month_now | ( | ) |
returns the local month.
Definition at line 347 of file earth_time.cpp.
References earth_time::day_in_year::month, and now().
| time_locus earth_time::now | ( | ) |
returns our current locus in the time continuum.
Definition at line 327 of file earth_time.cpp.
References convert().
Referenced by date_now(), day_now(), timer_driver::handle_system_timer(), month_now(), run_test_27(), time_now(), utility::timestamp(), and year_now().
| bool earth_time::set_time | ( | const time_locus & | new_time | ) |
makes the current time equal to "new_time".
This will only work if the operation is supported on this OS and if the current user has the proper privileges.
Definition at line 405 of file earth_time.cpp.
References earth_time::day_in_year::day_of_week, earth_time::day_in_year::day_of_year, earth_time::clock_time::hour, earth_time::clock_time::minute, earth_time::day_in_year::month, NULL, earth_time::clock_time::second, and earth_time::time_locus::year.
| const char * earth_time::short_month_name | ( | months | to_name | ) |
| clock_time earth_time::time_now | ( | ) |
what time is it?
Definition at line 343 of file earth_time.cpp.
References now().
Referenced by run_test_27().
| int earth_time::year_now | ( | ) |
what year is it?
Definition at line 349 of file earth_time.cpp.
References now(), and earth_time::time_locus::year.
| const double earth_time::APPROX_DAYS_IN_YEAR = 365.2424 |
A more accurate measure of the number of days in a year.
This is the more accurate mean length of time in 24 hour days between vernal equinoxes. it's about 11 minutes shy of 365.25 days.
Definition at line 62 of file earth_time.h.
| const int earth_time::days_in_month[12] |
The number of days in each month in the standard year.
Definition at line 33 of file earth_time.cpp.
Referenced by earth_time::day_in_year::normalize().
| const int earth_time::days_in_month[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } |
The number of days in each month in the standard year.
Definition at line 33 of file earth_time.cpp.
Referenced by earth_time::day_in_year::normalize().
| const int earth_time::DAYS_IN_YEAR = 365 |
| const int earth_time::HOURS_IN_DAY = 24 |
| const int earth_time::julian_days_in_month[12] |
Number of days in each month based on the julian calendar.
Definition at line 39 of file earth_time.cpp.
| const int earth_time::julian_days_in_month[12] = { 31, 29, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30 } |
Number of days in each month based on the julian calendar.
Definition at line 39 of file earth_time.cpp.
| const int earth_time::julian_leap_days_in_month[12] |
Number of days in each month of a leap year in the julian calendar.
Definition at line 43 of file earth_time.cpp.
| const int earth_time::julian_leap_days_in_month[12] = { 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30 } |
Number of days in each month of a leap year in the julian calendar.
Definition at line 43 of file earth_time.cpp.
| const int earth_time::leap_days_in_month[12] |
The number of days in each month in a leap year.
Definition at line 36 of file earth_time.cpp.
Referenced by earth_time::day_in_year::normalize().
| const int earth_time::leap_days_in_month[12] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } |
The number of days in each month in a leap year.
Definition at line 36 of file earth_time.cpp.
Referenced by earth_time::day_in_year::normalize().
| const int earth_time::LEAP_DAYS_IN_YEAR = 366 |
| const int earth_time::MINUTES_IN_HOUR = 60 |
| const int earth_time::SECONDS_IN_MINUTE = 60 |
1.5.1