Go to the source code of this file.
Namespaces | |
namespace | drizzled |
TODO: Rename this file - func.h is stupid. | |
Defines | |
#define | JULIAN_DAY_NUMBER_AT_ABSOLUTE_DAY_ONE INT64_C(1721425) |
#define | DAYS_IN_NORMAL_YEAR INT32_C(365) |
#define | DAYS_IN_LEAP_YEAR INT32_C(366) |
#define | UNIX_EPOCH_MIN_YEARS 1970 |
#define | UNIX_EPOCH_MAX_YEARS 2038 |
#define | CALENDAR_YY_PART_YEAR 70 |
#define | GREGORIAN_DAYS_IN_400_YEARS UINT32_C(146097) |
#define | GREGORIAN_DAYS_IN_100_YEARS UINT32_C(36524) |
#define | GREGORIAN_DAYS_IN_4_YEARS UINT32_C(1461) |
Enumerations | |
enum | drizzled::calendar { GREGORIAN = 1, JULIAN = 2, HEBREW = 3, ISLAM = 4 } |
Functions | |
int64_t | drizzled::julian_day_number_from_gregorian_date (uint32_t year, uint32_t month, uint32_t day) |
int64_t | drizzled::absolute_day_number_to_julian_day_number (int64_t absolute_day) |
int64_t | drizzled::julian_day_number_to_absolute_day_number (int64_t julian_day) |
void | drizzled::gregorian_date_from_julian_day_number (int64_t julian_day, uint32_t *year_out, uint32_t *month_out, uint32_t *day_out) |
void | drizzled::gregorian_date_from_absolute_day_number (int64_t absolute_day, uint32_t *year_out, uint32_t *month_out, uint32_t *day_out) |
uint32_t | drizzled::days_in_year (uint32_t year, enum calendar calendar) |
uint32_t | drizzled::days_in_year_gregorian (const uint32_t year) |
uint32_t | drizzled::days_in_year_julian (const uint32_t year) |
int32_t | drizzled::number_of_leap_years_julian (uint32_t year) |
int32_t | drizzled::number_of_leap_years_gregorian (uint32_t year) |
uint32_t | drizzled::days_in_gregorian_year_month (uint32_t year, uint32_t month) |
static bool | drizzled::num_leap_years (uint32_t y, enum calendar c) |
uint32_t | drizzled::day_of_week (int64_t day_number, bool sunday_is_first_day_of_week) |
bool | drizzled::is_valid_gregorian_date (uint32_t year, uint32_t month, uint32_t day) |
bool | drizzled::in_unix_epoch_range (uint32_t year, uint32_t month, uint32_t day, uint32_t hour, uint32_t minute, uint32_t second) |
uint32_t | drizzled::week_number_from_gregorian_date (uint32_t year, uint32_t month, uint32_t day, bool sunday_is_first_day_of_week) |
uint32_t | drizzled::iso_week_number_from_gregorian_date (uint32_t year, uint32_t month, uint32_t day) |
uint32_t | drizzled::year_month_to_months (uint32_t year_month) |
uint32_t | drizzled::months_to_year_month (uint32_t months) |
static bool | drizzled::is_leap_year (uint32_t y, enum calendar c) |
static bool | drizzled::is_gregorian_leap_year (uint32_t y) |
static bool | drizzled::is_julian_leap_year (uint32_t y) |
Structures and functions for:
Calculating day number in Gregorian and Julian proleptic calendars. Converting between day numbers and dates in the calendars. Converting between different calendars. Calculating differences between dates.
Works used in research:
"Calendrical Calculations", Dershowitz and Reingold ISO 8601 http://en.wikipedia.org/wiki/ISO_8601 http://www.ddj.com/hpc-high-performance-computing/197006254 http://en.wikipedia.org/wiki/Julian_day#Calculation
Definition in file calendar.h.
#define GREGORIAN_DAYS_IN_400_YEARS UINT32_C(146097) |
The following constants define the system of calculating the number of days in various periods of time in the Gregorian calendar.
Leap years (years containing 366 days) occur:
Definition at line 61 of file calendar.h.