CelestialCalendar 1.0.0 · unreleased development @ 67a7c4c79a4a4a6aa7e703c9e6f0039ae34bee82
Loading...
Searching...
No Matches
jieqi.hpp File Reference
#include <array>
#include <chrono>
#include <format>
#include <ranges>
#include <cstdint>
#include <utility>
#include <stdexcept>
#include <string_view>
#include "sun.hpp"
#include "cache.hpp"
#include "datetime.hpp"
#include "julian_day.hpp"

Classes

struct  calendar::jieqi::JieqiGenerator
 A generator that generates consecutive Jieqis and their moments (in JDE), starting from a given JDE (exclusive). More...
struct  calendar::jieqi::JieqiGenerator::JieqiPair
 A Jieqi and its JDE(TT). More...

Namespaces

namespace  calendar
namespace  calendar::jieqi
namespace  calendar::jieqi::detail

Enumerations

enum class  calendar::jieqi::Jieqi : uint8_t {
  calendar::jieqi::立春 , calendar::jieqi::雨水 , calendar::jieqi::惊蛰 , calendar::jieqi::春分 ,
  calendar::jieqi::清明 , calendar::jieqi::谷雨 , calendar::jieqi::立夏 , calendar::jieqi::小满 ,
  calendar::jieqi::芒种 , calendar::jieqi::夏至 , calendar::jieqi::小暑 , calendar::jieqi::大暑 ,
  calendar::jieqi::立秋 , calendar::jieqi::处暑 , calendar::jieqi::白露 , calendar::jieqi::秋分 ,
  calendar::jieqi::寒露 , calendar::jieqi::霜降 , calendar::jieqi::立冬 , calendar::jieqi::小雪 ,
  calendar::jieqi::大雪 , calendar::jieqi::冬至 , calendar::jieqi::小寒 , calendar::jieqi::大寒 ,
  calendar::jieqi::COUNT , calendar::jieqi::LICHUN , calendar::jieqi::YUSHUI , calendar::jieqi::JINGZHE ,
  calendar::jieqi::CHUNFEN , calendar::jieqi::QINGMING , calendar::jieqi::GUYU , calendar::jieqi::LIXIA ,
  calendar::jieqi::XIAOMAN , calendar::jieqi::MANGZHONG , calendar::jieqi::XIAZHI , calendar::jieqi::XIAOSHU ,
  calendar::jieqi::DASHU , calendar::jieqi::LIQIU , calendar::jieqi::CHUSHU , calendar::jieqi::BAILU ,
  calendar::jieqi::QIUFEN , calendar::jieqi::HANLU , calendar::jieqi::SHUANGJIANG , calendar::jieqi::LIDONG ,
  calendar::jieqi::XIAOXUE , calendar::jieqi::DAXUE , calendar::jieqi::DONGZHI , calendar::jieqi::XIAOHAN ,
  calendar::jieqi::DAHAN
}
 The Chinese Jieqi (节气). More...

Functions

constexpr auto calendar::jieqi::is_jie (const Jieqi jq) -> bool
 Check if the given jq is a Jie (节).
constexpr auto calendar::jieqi::is_qi (const Jieqi jq) -> bool
 Check if the given jq is a Qi (气).
constexpr auto calendar::jieqi::to_index (const Jieqi jq) -> uint8_t
 Get the index of the given jq.
constexpr auto calendar::jieqi::detail::checked_index (const uint8_t index) -> uint8_t
constexpr auto calendar::jieqi::from_index (const uint8_t index) -> Jieqi
 Get the Jieqi at a 0-based index counted from 立春.
constexpr auto calendar::jieqi::name_of (const Jieqi jq) -> std::string_view
 Get the name of the given jq.
constexpr auto calendar::jieqi::longitude_of (const Jieqi jq) -> double
 Get the solar longitude (in degrees) at which the given jq begins.
auto calendar::jieqi::calc_jieqi_jde (const int32_t year, const Jieqi jq) -> double
 Get the JDE for the given year and jieqi.
auto calendar::jieqi::jieqi_jde (const int32_t year, const Jieqi jq) -> double
 Get the JDE for the given year and jieqi, using cache.
auto calendar::jieqi::jieqi_ut1_moment (const int32_t year, const Jieqi jq) -> calendar::Datetime
 Get the UT1 moment of the given year and jieqi.

Variables

constexpr uint8_t calendar::jieqi::JIEQI_COUNT
constexpr auto calendar::jieqi::JIEQI_LIST
 A view of all enum values of Jieqi.
constexpr auto calendar::jieqi::GREGORIAN_YEAR_JIEQI_LIST
 Jieqi in Gregorian calendar order, beginning with 小寒.
constexpr std::array< std::string_view, JIEQI_COUNT > calendar::jieqi::JIEQI_NAME
 Name of each Jieqi, positioned by to_index.
constexpr std::array< double, JIEQI_COUNT > calendar::jieqi::JIEQI_SOLAR_LONGITUDE
 Solar longitude (in degrees) at which each Jieqi begins, positioned by to_index.