aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/restricted/abseil-cpp-tstring/y_absl/time/civil_time.cc
diff options
context:
space:
mode:
authorheretic <heretic@yandex-team.ru>2022-02-10 16:45:43 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:43 +0300
commit397cbe258b9e064f49c4ca575279f02f39fef76e (patch)
treea0b0eb3cca6a14e4e8ea715393637672fa651284 /contrib/restricted/abseil-cpp-tstring/y_absl/time/civil_time.cc
parent43f5a35593ebc9f6bcea619bb170394ea7ae468e (diff)
downloadydb-397cbe258b9e064f49c4ca575279f02f39fef76e.tar.gz
Restoring authorship annotation for <heretic@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/restricted/abseil-cpp-tstring/y_absl/time/civil_time.cc')
-rw-r--r--contrib/restricted/abseil-cpp-tstring/y_absl/time/civil_time.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/time/civil_time.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/time/civil_time.cc
index f24bac91e8..ee255126f9 100644
--- a/contrib/restricted/abseil-cpp-tstring/y_absl/time/civil_time.cc
+++ b/contrib/restricted/abseil-cpp-tstring/y_absl/time/civil_time.cc
@@ -45,7 +45,7 @@ template <typename CivilT>
bool ParseYearAnd(string_view fmt, string_view s, CivilT* c) {
// Civil times support a larger year range than y_absl::Time, so we need to
// parse the year separately, normalize it, then use y_absl::ParseTime on the
- // normalized string.
+ // normalized string.
const TString ss = TString(s); // TODO(y_absl-team): Avoid conversion.
const char* const np = ss.c_str();
char* endp;
@@ -80,7 +80,7 @@ bool ParseAs(string_view s, CivilT2* c) {
template <typename CivilT>
bool ParseLenient(string_view s, CivilT* c) {
- // A fastpath for when the given string data parses exactly into the given
+ // A fastpath for when the given string data parses exactly into the given
// type T (e.g., s="YYYY-MM-DD" and CivilT=CivilDay).
if (ParseCivilTime(s, c)) return true;
// Try parsing as each of the 6 types, trying the most common types first
@@ -96,26 +96,26 @@ bool ParseLenient(string_view s, CivilT* c) {
} // namespace
TString FormatCivilTime(CivilSecond c) {
- return FormatYearAnd("-%m-%d%ET%H:%M:%S", c);
+ return FormatYearAnd("-%m-%d%ET%H:%M:%S", c);
}
TString FormatCivilTime(CivilMinute c) {
- return FormatYearAnd("-%m-%d%ET%H:%M", c);
+ return FormatYearAnd("-%m-%d%ET%H:%M", c);
}
TString FormatCivilTime(CivilHour c) {
- return FormatYearAnd("-%m-%d%ET%H", c);
+ return FormatYearAnd("-%m-%d%ET%H", c);
}
TString FormatCivilTime(CivilDay c) { return FormatYearAnd("-%m-%d", c); }
TString FormatCivilTime(CivilMonth c) { return FormatYearAnd("-%m", c); }
TString FormatCivilTime(CivilYear c) { return FormatYearAnd("", c); }
bool ParseCivilTime(string_view s, CivilSecond* c) {
- return ParseYearAnd("-%m-%d%ET%H:%M:%S", s, c);
+ return ParseYearAnd("-%m-%d%ET%H:%M:%S", s, c);
}
bool ParseCivilTime(string_view s, CivilMinute* c) {
- return ParseYearAnd("-%m-%d%ET%H:%M", s, c);
+ return ParseYearAnd("-%m-%d%ET%H:%M", s, c);
}
bool ParseCivilTime(string_view s, CivilHour* c) {
- return ParseYearAnd("-%m-%d%ET%H", s, c);
+ return ParseYearAnd("-%m-%d%ET%H", s, c);
}
bool ParseCivilTime(string_view s, CivilDay* c) {
return ParseYearAnd("-%m-%d", s, c);