acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
aaa_day.h
1// Created by camilo on 2021-10-05 12:45 BRT <3ThomasBorregaardSorensen!![ THE ONE GOD ]
2#pragma once
3//
4//
5//class CLASS_DECL_ACME floating_day_t :
6// public floating_day
7//{
8//public:
9//
10//
11// using BASE_TYPE = floating_day;
12//
13//
14// constexpr floating_day_t(floating_day day = {}) : floating_day(day) {}
15//
16//
17// integral_second integral_seconds() const { return integral_second((::i64)(m_f64 * 86'400.0)); }
18// integral_nanosecond integral_nanoseconds() const { return integral_nanosecond((::i64)(fmod(m_f64 * 86'400.0, 1.0) * 1'000'000'000.0)); }
19//
20//
21//};
22//
23//
24//using floating_day = floating_time < floating_day_t >;
25
26//
27//constexpr floating_day operator""_day(::f128 d) { return (floating_day)d; }
28//constexpr floating_day operator""_days(::f128 d) { return (floating_day)d; }
29
30
31inline floating_day get_floating_day() { return floating_day(get_floating_nanosecond().m_f64 / 86'400'000'000'000.0); }
32
33
34template < >
35inline floating_day now<floating_day>()
36{
37
38 return get_floating_day();
39
40}
41
42
43