userver: userver/utils/datetime/date.hpp File Reference
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
date.hpp File Reference

Detailed Description

Date in format YYYY-MM-DD, std::chrono::year_month_day like type.

Definition in file date.hpp.

Go to the source code of this file.

#include <chrono>
#include <iosfwd>
#include <stdexcept>
#include <string>
#include <userver/formats/common/meta.hpp>
+ Include dependency graph for date.hpp:
+ This graph shows which files directly or indirectly include this file:

Classes

class  utils::datetime::Date
 Date in format YYYY-MM-DD, std::chrono::year_month_day like type. More...
 

Namespaces

namespace  logging
 Logging macro and utilities.
 
namespace  utils
 Utilities.
 
namespace  utils::datetime
 Date and time utilities.
 

Functions

Date utils::datetime::DateFromRFC3339String (const std::string &date_string)
 Validates date_string and constructs date from YYYY-MM-DD string and.
 
std::string utils::datetime::ToString (Date date)
 Outputs date as a YYYY-MM-DD string.
 
template<typename Value >
std::enable_if_t< formats::common::kIsFormatValue< Value >, Dateutils::datetime::Parse (const Value &value, formats::parse::To< Date >)
 
template<typename Value >
std::enable_if_t< formats::common::kIsFormatValue< Value >, Value > utils::datetime::Serialize (Date date, formats::serialize::To< Value >)
 
template<typename StringBuilder >
void utils::datetime::WriteToStream (Date value, StringBuilder &sw)
 
template<typename LogHelper = ::logging::LogHelper>
::logging::LogHelperutils::datetime::operator<< (::logging::LogHelper &lh, const Date &date)
 
std::ostream & utils::datetime::operator<< (std::ostream &os, Date date)