Date and time utilities simplified. More...
#include <DateTime.hpp>
Static Public Member Functions | |
| template<typename Rep , typename Period > | |
| static std::chrono::duration< Rep, Period > | toDuration (const char *format, const std::string &s) |
| Create a duration from the supplied string which is in the specified format. More... | |
| template<typename AllocatorT , typename Clock , typename Dur > | |
| static U8String< AllocatorT > | toString (const char *format, const std::chrono::time_point< Clock, Dur > &tp) |
| Format the time point as a string with the specified format. More... | |
| template<typename Clock , typename Dur > | |
| static std::string | toString (const char *format, const std::chrono::time_point< Clock, Dur > &tp) |
| Format the time point as a string with the specified format. More... | |
| template<typename Clock , typename Dur > | |
| static void | toString (std::ostream &stream, const char *format, const std::chrono::time_point< Clock, Dur > &tp) |
| Format the time point as a string with the specified format into the supplied output stream. More... | |
| template<typename AllocatorT , typename Rep , typename Period > | |
| static U8String< AllocatorT > | toString (const char *format, const std::chrono::duration< Rep, Period > &d) |
| Format the duration as a string with the specified format. More... | |
| template<typename Rep , typename Period > | |
| static std::string | toString (const char *format, const std::chrono::duration< Rep, Period > &d) |
| Format the duration as a string with the specified format. More... | |
| template<typename Rep , typename Period > | |
| static void | toString (std::ostream &stream, const char *format, const std::chrono::duration< Rep, Period > &d) |
| Format the duration as a string with the specified format into the supplied output stream. More... | |
Date and time utilities simplified.
|
inlinestatic |
Create a duration from the supplied string which is in the specified format.
Refer to the formatting documentation at https://howardhinnant.github.io/date/date.html for details on the format placeholders.
Example format: "%Y-%m-%d %H:%M:%S"
|
inlinestatic |
Format the time point as a string with the specified format.
Refer to the formatting documentation at https://howardhinnant.github.io/date/date.html for details on the format placeholders.
Example format: "%Y-%m-%d %H:%M:%S"
|
inlinestatic |
Format the time point as a string with the specified format.
Refer to the formatting documentation at https://howardhinnant.github.io/date/date.html for details on the format placeholders.
Example format: "%Y-%m-%d %H:%M:%S"
|
inlinestatic |
Format the time point as a string with the specified format into the supplied output stream.
Refer to the formatting documentation at https://howardhinnant.github.io/date/date.html for details on the format placeholders.
Example format: "%Y-%m-%d %H:%M:%S"
|
inlinestatic |
Format the duration as a string with the specified format.
Refer to the formatting documentation at https://howardhinnant.github.io/date/date.html for details on the format placeholders.
Example format: "%Y-%m-%d %H:%M:%S"
|
inlinestatic |
Format the duration as a string with the specified format.
Refer to the formatting documentation at https://howardhinnant.github.io/date/date.html for details on the format placeholders.
Example format: "%Y-%m-%d %H:%M:%S"
|
inlinestatic |
Format the duration as a string with the specified format into the supplied output stream.
Refer to the formatting documentation at https://howardhinnant.github.io/date/date.html for details on the format placeholders.
Example format: "%Y-%m-%d %H:%M:%S"