#ifndef seafire__protocol__rfc7231__date_hxx_ #define seafire__protocol__rfc7231__date_hxx_ #include #include #include #include #include namespace seafire::protocol::rfc7231 { /// fixme: make class struct date_t { using alias_type = std::chrono::system_clock::time_point; static constexpr char const name[] = "date"; static std::optional try_parse(std::vector const& strings, std::error_code&) { if (strings.empty()) { return std::nullopt; } return try_parse_http_date(strings.front()); } static std::string to_string(std::chrono::system_clock::time_point const& time) { return format_http_date(time); } }; } // namespace seafire::protocol::rfc7231 #endif