DAW JSON Link
Classes | Functions
daw::json::datetime Namespace Reference

Classes

struct  date_parts
 
struct  time_parts
 
struct  ymdhms
 

Functions

template<typename Clock = std::chrono::system_clock, typename Duration = std::chrono::milliseconds>
constexpr std::chrono::time_point< Clock, Duration > civil_to_time_point (std::int_least32_t yr, std::uint_least32_t mo, std::uint_least32_t dy, std::uint_least32_t hr, std::uint_least32_t mn, std::uint_least32_t se, std::uint_least32_t ms)
 
constexpr std::string_view month_short_name (unsigned m)
 
template<typename Bounds , std::ptrdiff_t Ex>
constexpr std::chrono::time_point< std::chrono::system_clock, std::chrono::milliseconds > parse_iso8601_timestamp (daw::basic_string_view< char, Bounds, Ex > ts)
 
template<typename Bounds , std::ptrdiff_t Ex>
constexpr date_parts parse_iso_8601_date (daw::basic_string_view< char, Bounds, Ex > timestamp_str)
 
template<typename Bounds , std::ptrdiff_t Ex>
constexpr time_parts parse_iso_8601_time (daw::basic_string_view< char, Bounds, Ex > timestamp_str)
 
constexpr unsigned parse_short_month (std::string_view ts)
 
template<typename Duration >
constexpr std::string_view short_day_of_week (std::chrono::time_point< std::chrono::system_clock, Duration > tp)
 
template<typename Clock , typename Duration >
constexpr ymdhms time_point_to_civil (std::chrono::time_point< Clock, Duration > const &tp)
 

Function Documentation

◆ civil_to_time_point()

template<typename Clock = std::chrono::system_clock, typename Duration = std::chrono::milliseconds>
constexpr std::chrono::time_point<Clock, Duration> daw::json::datetime::civil_to_time_point ( std::int_least32_t  yr,
std::uint_least32_t  mo,
std::uint_least32_t  dy,
std::uint_least32_t  hr,
std::uint_least32_t  mn,
std::uint_least32_t  se,
std::uint_least32_t  ms 
)
constexpr

◆ month_short_name()

constexpr std::string_view daw::json::datetime::month_short_name ( unsigned  m)
constexpr

◆ parse_iso8601_timestamp()

template<typename Bounds , std::ptrdiff_t Ex>
constexpr std::chrono::time_point<std::chrono::system_clock, std::chrono::milliseconds> daw::json::datetime::parse_iso8601_timestamp ( daw::basic_string_view< char, Bounds, Ex >  ts)
constexpr

◆ parse_iso_8601_date()

template<typename Bounds , std::ptrdiff_t Ex>
constexpr date_parts daw::json::datetime::parse_iso_8601_date ( daw::basic_string_view< char, Bounds, Ex >  timestamp_str)
constexpr

◆ parse_iso_8601_time()

template<typename Bounds , std::ptrdiff_t Ex>
constexpr time_parts daw::json::datetime::parse_iso_8601_time ( daw::basic_string_view< char, Bounds, Ex >  timestamp_str)
constexpr

◆ parse_short_month()

constexpr unsigned daw::json::datetime::parse_short_month ( std::string_view  ts)
constexpr

◆ short_day_of_week()

template<typename Duration >
constexpr std::string_view daw::json::datetime::short_day_of_week ( std::chrono::time_point< std::chrono::system_clock, Duration >  tp)
constexpr

◆ time_point_to_civil()

template<typename Clock , typename Duration >
constexpr ymdhms daw::json::datetime::time_point_to_civil ( std::chrono::time_point< Clock, Duration > const &  tp)
constexpr