AnCH Framework 0.2
Another C++ Hack: C++23 utility libraries
Loading...
Searching...
No Matches
anch::date Namespace Reference

Dates namespace. More...

Namespaces

namespace  rfc3339
 RFC 3339 dates formatting and parsing.

Classes

class  Date
 Calendar day (RFC 3339 full-date , JSON schema and OpenAPI date format, XSD xs:date ). More...
struct  DateFields
 Broken down date and time ( DateTime::fields ): local time or UTC. More...
class  DateFormatter
 DateTime string formatter and parser More...
class  DateTime
 Point in time. More...
class  IDatePartFormatter
 Date and time part formatter interface. More...
class  OffsetTime
 Time of day with an offset from UTC (RFC 3339 full-time , time format of JSON schema and OpenAPI). More...
class  Time
 Time of day (RFC 3339 partial-time , SQL TIME , XSD xs:time without time zone). More...

Typedefs

typedef anch::date::IDatePartFormatter *(*) getInstance()

Enumerations

enum class  Zone { UTC , LOCAL }
 Time zone of conversions between days and points in time. More...

Functions

std::ostream & operator<< (std::ostream &out, const anch::date::Date &date)
std::ostream & operator<< (std::ostream &out, const anch::date::OffsetTime &time)
std::ostream & operator<< (std::ostream &out, const anch::date::Time &time)

Detailed Description

Dates namespace.

It contains utilities for date and time management.
anch::date::DateTime is based on std::chrono (nanosecond precision) and on localtime_r for local time. anch::date::DateFormatter provides a date parser and formatter with a syntax close to strftime .

Typedef Documentation

◆ getInstance

typedef anch::date::IDatePartFormatter *(*) anch::date::getInstance()

anch::date::IDatePartFormatter instance getter function prototype (the instance is deleted by DateFormatter )

Enumeration Type Documentation

◆ Zone

enum class anch::date::Zone
strong

Time zone of conversions between days and points in time.

Since
0.3
Enumerator
UTC 

UTC

LOCAL 

Local time (follows TZ environment variable)

Function Documentation

◆ operator<<() [1/3]

std::ostream & anch::date::operator<< ( std::ostream & out,
const anch::date::Date & date )

Write RFC 3339 full-date

Parameters
outthe output stream
datethe date
Returns
the output stream
Since
0.3

◆ operator<<() [2/3]

std::ostream & anch::date::operator<< ( std::ostream & out,
const anch::date::OffsetTime & time )

Write RFC 3339 full-time

Parameters
outthe output stream
timethe time
Returns
the output stream
Since
0.3

◆ operator<<() [3/3]

std::ostream & anch::date::operator<< ( std::ostream & out,
const anch::date::Time & time )

Write RFC 3339 partial-time

Parameters
outthe output stream
timethe time
Returns
the output stream
Since
0.3