MT Core (C++)
Core library for replacing C++ standard in project usage
Loading...
Searching...
No Matches
epochs.hpp
Go to the documentation of this file.
1/*
2
3Copyright 2025 Matthew Tolman
4
5Licensed under the Apache License, Version 2.0 (the "License");
6you may not use this file except in compliance with the License.
7You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software
12distributed under the License is distributed on an "AS IS" BASIS,
13WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14See the License for the specific language governing permissions and
15limitations under the License.
16
17*/
18
19#ifndef MTCORE_CALENDARS_EPOCHS_HPP
20#define MTCORE_CALENDARS_EPOCHS_HPP
21
22#include "mtcore.hpp"
23
24namespace mtcore::calendars {
25 constexpr i32 FIXED_EPOCH = 0;
26 constexpr i32 GREGORIAN_EPOCH = 1;
27 constexpr i32 EGYPTIAN_EPOCH = -272787;
28 constexpr i32 ARMENIAN_EPOCH = 201443;
29 constexpr i32 AKAN_EPOCH = 37;
30 constexpr i32 JULIAN_EPOCH = -1;
31 constexpr i32 BALINESE_PAWUKON_EPOCH = -1721279;
32 constexpr i32 COPTIC_EPOCH = 103605;
33 constexpr i32 ETHIOPIC_EPOCH = 2796;
34 constexpr i32 HEBREW_EPOCH = -1373427;
35 constexpr i32 ICELANDIC_EPOCH = 109;
36 constexpr i32 ISLAMIC_EPOCH = 227015;
37 constexpr f64 JULIAN_DAY_EPOCH = -1721424.5;
38 constexpr i32 MAYAN_LONG_DATE_EPOCH = -1137142;
41 constexpr i32 UNIX_TIMESTAMP_EPOCH = 719163;
42 constexpr f64 MODIFIED_JULIAN_DAY_EPOCH = 678576;
43 constexpr i32 ZOROASTRIAN_EPOCH = 230638;
44
45 // Correlation is based on the fall of Mexico City to Hernán Cortés on August 13, 1521 (Julian)
46 constexpr i32 AZTEC_CORRELATION = 555403;
49
50 constexpr f64 ARYA_LUNAR_MONTH = 1577917500.0 / 53433336.0;
52 constexpr i32 OLD_HINDU_SOLAR_EPOCH = -1132959;
53 constexpr f64 ARYA_SOLAR_YEAR = 15779175.0 / 43200.0;
55 constexpr f64 ARYA_JOVIAN_PERIOD = 1577917500.0 / 364224.0;
56} // namespace mtcore::calendars
57
58#endif // MTCORE_CALENDARS_EPOCHS_HPP
int32_t i32
Alias for 32-bit ints.
double f64
Alias for 64-bit floats.
Namespace for calendaring systems.
constexpr i32 AKAN_EPOCH
Definition epochs.hpp:29
constexpr i32 MAYAN_HAAB_EPOCH
Definition epochs.hpp:39
constexpr i32 ETHIOPIC_EPOCH
Definition epochs.hpp:33
constexpr i32 FIXED_EPOCH
Definition epochs.hpp:25
constexpr f64 ARYA_LUNAR_MONTH
Definition epochs.hpp:50
constexpr i32 UNIX_TIMESTAMP_EPOCH
Definition epochs.hpp:41
constexpr i32 ARMENIAN_EPOCH
Definition epochs.hpp:28
constexpr i32 MAYAN_TZOLKIN_EPOCH
Definition epochs.hpp:40
constexpr i32 MAYAN_LONG_DATE_EPOCH
Definition epochs.hpp:38
constexpr i32 OLD_HINDU_SOLAR_EPOCH
Definition epochs.hpp:52
constexpr i32 ICELANDIC_EPOCH
Definition epochs.hpp:35
constexpr i32 AZTEC_CORRELATION
Definition epochs.hpp:46
constexpr f64 MODIFIED_JULIAN_DAY_EPOCH
Definition epochs.hpp:42
constexpr f64 ARYA_JOVIAN_PERIOD
Definition epochs.hpp:55
constexpr i32 BALINESE_PAWUKON_EPOCH
Definition epochs.hpp:31
constexpr f64 ARYA_SOLAR_YEAR
Definition epochs.hpp:53
constexpr i32 EGYPTIAN_EPOCH
Definition epochs.hpp:27
constexpr f64 ARYA_SOLAR_MONTH
Definition epochs.hpp:54
constexpr i32 ZOROASTRIAN_EPOCH
Definition epochs.hpp:43
constexpr i32 GREGORIAN_EPOCH
Definition epochs.hpp:26
constexpr i32 ISLAMIC_EPOCH
Definition epochs.hpp:36
constexpr f64 JULIAN_DAY_EPOCH
Definition epochs.hpp:37
constexpr i32 JULIAN_EPOCH
Definition epochs.hpp:30
constexpr i32 COPTIC_EPOCH
Definition epochs.hpp:32
constexpr i32 TONALPOHUALLI_CORRELATION
Definition epochs.hpp:47
constexpr i32 HEBREW_EPOCH
Definition epochs.hpp:34
constexpr f64 ARYA_LUNAR_DAY
Definition epochs.hpp:51
constexpr i32 XIHUITL_CORRELATION
Definition epochs.hpp:48