32 return 2400 + year % 400;
36 std::string FormatYearAnd(string_view fmt,
CivilSecond cs) {
37 const CivilSecond ncs(NormalizeYear(cs.year()), cs.month(), cs.day(),
38 cs.hour(), cs.minute(), cs.second());
48 return FormatYearAnd(
"-%m-%dT%H:%M:%S", c);
51 return FormatYearAnd(
"-%m-%dT%H:%M", c);
54 return FormatYearAnd(
"-%m-%dT%H", c);
60 namespace time_internal {
std::string FormatTime(const std::string &format, absl::Time t, absl::TimeZone tz)
time_internal::cctz::year_t civil_year_t
std::string StrCat(const AlphaNum &a, const AlphaNum &b)
std::ostream & operator<<(std::ostream &os, CivilYear y)
time_internal::cctz::detail::civil_time< time_internal::second_tag > CivilSecond
Time FromCivil(CivilSecond ct, TimeZone tz)
std::string FormatCivilTime(CivilSecond c)