aboutsummaryrefslogtreecommitdiffstats
path: root/util/datetime/parser.rl6
diff options
context:
space:
mode:
authordanlark <danlark@yandex-team.ru>2022-02-10 16:46:08 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:08 +0300
commit3426a9bc7f169ae9da54cef557ad2a33f6e8eee0 (patch)
tree26154e1e9990f1bb4525d3e3fb5b6dac2c2c1da2 /util/datetime/parser.rl6
parentcb68f224c46a8ee52ac3fdd2a32534b8bb8dc134 (diff)
downloadydb-3426a9bc7f169ae9da54cef557ad2a33f6e8eee0.tar.gz
Restoring authorship annotation for <danlark@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/datetime/parser.rl6')
-rw-r--r--util/datetime/parser.rl652
1 files changed, 26 insertions, 26 deletions
diff --git a/util/datetime/parser.rl6 b/util/datetime/parser.rl6
index 931f09eae1..cb6ec3bcfa 100644
--- a/util/datetime/parser.rl6
+++ b/util/datetime/parser.rl6
@@ -461,30 +461,30 @@ static inline TResult ParseUnsafe(const char* input, size_t len) {
}
TInstant TInstant::ParseIso8601Deprecated(const TStringBuf input) {
- return ParseUnsafe<TIso8601DateTimeParserDeprecated, TInstant>(input.data(), input.size());
+ return ParseUnsafe<TIso8601DateTimeParserDeprecated, TInstant>(input.data(), input.size());
}
TInstant TInstant::ParseRfc822Deprecated(const TStringBuf input) {
- return ParseUnsafe<TRfc822DateTimeParserDeprecated, TInstant>(input.data(), input.size());
+ return ParseUnsafe<TRfc822DateTimeParserDeprecated, TInstant>(input.data(), input.size());
}
TInstant TInstant::ParseHttpDeprecated(const TStringBuf input) {
- return ParseUnsafe<THttpDateTimeParserDeprecated, TInstant>(input.data(), input.size());
+ return ParseUnsafe<THttpDateTimeParserDeprecated, TInstant>(input.data(), input.size());
}
TInstant TInstant::ParseX509ValidityDeprecated(const TStringBuf input) {
- switch (input.size()) {
+ switch (input.size()) {
case 13:
- return ParseUnsafe<TX509ValidityDateTimeParserDeprecated, TInstant>(input.data(), 13);
+ return ParseUnsafe<TX509ValidityDateTimeParserDeprecated, TInstant>(input.data(), 13);
case 15:
- return ParseUnsafe<TX509Validity4yDateTimeParserDeprecated, TInstant>(input.data(), 15);
+ return ParseUnsafe<TX509Validity4yDateTimeParserDeprecated, TInstant>(input.data(), 15);
default:
ythrow TDateTimeParseException();
}
}
bool TInstant::TryParseIso8601Deprecated(const TStringBuf input, TInstant& instant) {
- const auto parsed = ParseUnsafe<TIso8601DateTimeParserDeprecated, TInstant, false>(input.data(), input.size());
+ const auto parsed = ParseUnsafe<TIso8601DateTimeParserDeprecated, TInstant, false>(input.data(), input.size());
if (TInstant::Max() == parsed) {
return false;
}
@@ -493,7 +493,7 @@ bool TInstant::TryParseIso8601Deprecated(const TStringBuf input, TInstant& insta
}
bool TInstant::TryParseRfc822Deprecated(const TStringBuf input, TInstant& instant) {
- const auto parsed = ParseUnsafe<TRfc822DateTimeParserDeprecated, TInstant, false>(input.data(), input.size());
+ const auto parsed = ParseUnsafe<TRfc822DateTimeParserDeprecated, TInstant, false>(input.data(), input.size());
if (TInstant::Max() == parsed) {
return false;
}
@@ -502,7 +502,7 @@ bool TInstant::TryParseRfc822Deprecated(const TStringBuf input, TInstant& instan
}
bool TInstant::TryParseHttpDeprecated(const TStringBuf input, TInstant& instant) {
- const auto parsed = ParseUnsafe<THttpDateTimeParserDeprecated, TInstant, false>(input.data(), input.size());
+ const auto parsed = ParseUnsafe<THttpDateTimeParserDeprecated, TInstant, false>(input.data(), input.size());
if (TInstant::Max() == parsed) {
return false;
}
@@ -512,12 +512,12 @@ bool TInstant::TryParseHttpDeprecated(const TStringBuf input, TInstant& instant)
bool TInstant::TryParseX509Deprecated(const TStringBuf input, TInstant& instant) {
TInstant parsed;
- switch (input.size()) {
+ switch (input.size()) {
case 13:
- parsed = ParseUnsafe<TX509ValidityDateTimeParserDeprecated, TInstant, false>(input.data(), 13);
+ parsed = ParseUnsafe<TX509ValidityDateTimeParserDeprecated, TInstant, false>(input.data(), 13);
break;
case 15:
- parsed = ParseUnsafe<TX509Validity4yDateTimeParserDeprecated, TInstant, false>(input.data(), 15);
+ parsed = ParseUnsafe<TX509Validity4yDateTimeParserDeprecated, TInstant, false>(input.data(), 15);
break;
default:
return false;
@@ -530,30 +530,30 @@ bool TInstant::TryParseX509Deprecated(const TStringBuf input, TInstant& instant)
}
TInstant TInstant::ParseIso8601(const TStringBuf input) {
- return ParseUnsafe<TIso8601DateTimeParser, TInstant>(input.data(), input.size());
+ return ParseUnsafe<TIso8601DateTimeParser, TInstant>(input.data(), input.size());
}
TInstant TInstant::ParseRfc822(const TStringBuf input) {
- return ParseUnsafe<TRfc822DateTimeParser, TInstant>(input.data(), input.size());
+ return ParseUnsafe<TRfc822DateTimeParser, TInstant>(input.data(), input.size());
}
TInstant TInstant::ParseHttp(const TStringBuf input) {
- return ParseUnsafe<THttpDateTimeParser, TInstant>(input.data(), input.size());
+ return ParseUnsafe<THttpDateTimeParser, TInstant>(input.data(), input.size());
}
TInstant TInstant::ParseX509Validity(const TStringBuf input) {
- switch (input.size()) {
+ switch (input.size()) {
case 13:
- return ParseUnsafe<TX509ValidityDateTimeParser, TInstant>(input.data(), 13);
+ return ParseUnsafe<TX509ValidityDateTimeParser, TInstant>(input.data(), 13);
case 15:
- return ParseUnsafe<TX509Validity4yDateTimeParser, TInstant>(input.data(), 15);
+ return ParseUnsafe<TX509Validity4yDateTimeParser, TInstant>(input.data(), 15);
default:
ythrow TDateTimeParseException();
}
}
bool TInstant::TryParseIso8601(const TStringBuf input, TInstant& instant) {
- const auto parsed = ParseUnsafe<TIso8601DateTimeParser, TInstant, false>(input.data(), input.size());
+ const auto parsed = ParseUnsafe<TIso8601DateTimeParser, TInstant, false>(input.data(), input.size());
if (TInstant::Max() == parsed) {
return false;
}
@@ -562,7 +562,7 @@ bool TInstant::TryParseIso8601(const TStringBuf input, TInstant& instant) {
}
bool TInstant::TryParseRfc822(const TStringBuf input, TInstant& instant) {
- const auto parsed = ParseUnsafe<TRfc822DateTimeParser, TInstant, false>(input.data(), input.size());
+ const auto parsed = ParseUnsafe<TRfc822DateTimeParser, TInstant, false>(input.data(), input.size());
if (TInstant::Max() == parsed) {
return false;
}
@@ -571,7 +571,7 @@ bool TInstant::TryParseRfc822(const TStringBuf input, TInstant& instant) {
}
bool TInstant::TryParseHttp(const TStringBuf input, TInstant& instant) {
- const auto parsed = ParseUnsafe<THttpDateTimeParser, TInstant, false>(input.data(), input.size());
+ const auto parsed = ParseUnsafe<THttpDateTimeParser, TInstant, false>(input.data(), input.size());
if (TInstant::Max() == parsed) {
return false;
}
@@ -581,12 +581,12 @@ bool TInstant::TryParseHttp(const TStringBuf input, TInstant& instant) {
bool TInstant::TryParseX509(const TStringBuf input, TInstant& instant) {
TInstant parsed;
- switch (input.size()) {
+ switch (input.size()) {
case 13:
- parsed = ParseUnsafe<TX509ValidityDateTimeParser, TInstant, false>(input.data(), 13);
+ parsed = ParseUnsafe<TX509ValidityDateTimeParser, TInstant, false>(input.data(), 13);
break;
case 15:
- parsed = ParseUnsafe<TX509Validity4yDateTimeParser, TInstant, false>(input.data(), 15);
+ parsed = ParseUnsafe<TX509Validity4yDateTimeParser, TInstant, false>(input.data(), 15);
break;
default:
return false;
@@ -789,7 +789,7 @@ TDuration TDurationParser::GetResult(TDuration defaultValue) const {
}
bool TDuration::TryParse(const TStringBuf input, TDuration& result) {
- TDuration r = ::Parse<TDurationParser, TDuration>(input.data(), input.size(), TDuration::Max());
+ TDuration r = ::Parse<TDurationParser, TDuration>(input.data(), input.size(), TDuration::Max());
if (r == TDuration::Max())
return false;
result = r;
@@ -797,5 +797,5 @@ bool TDuration::TryParse(const TStringBuf input, TDuration& result) {
}
TDuration TDuration::Parse(const TStringBuf input) {
- return ParseUnsafe<TDurationParser, TDuration>(input.data(), input.size());
+ return ParseUnsafe<TDurationParser, TDuration>(input.data(), input.size());
}