diff options
| author | akhropov <[email protected]> | 2025-11-02 22:00:35 +0300 |
|---|---|---|
| committer | akhropov <[email protected]> | 2025-11-02 22:19:07 +0300 |
| commit | 759de65a55e63741da99ccfdee85d7976f7d9ec9 (patch) | |
| tree | 765c5453ff4b2c410a741a9c2732b9a8d698e86c /util | |
| parent | d6ecec93a2246c8b3efcb6447508303072f9473e (diff) | |
Fix grammar
commit_hash:cc9c4f3b15352d534dd69064a2ba4bbecb7bc117
Diffstat (limited to 'util')
| -rw-r--r-- | util/datetime/base.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/util/datetime/base.h b/util/datetime/base.h index 7f1df70bddd..f5e9c3ff147 100644 --- a/util/datetime/base.h +++ b/util/datetime/base.h @@ -268,14 +268,14 @@ public: * TDuration is compatible with std::chrono::duration: * it can be constructed and compared with std::chrono::duration. * But there are two significant and dangerous differences between them: - * 1) TDuration is never negative and use saturation between 0 and maximum value. + * 1) TDuration is never negative and uses saturation between 0 and the maximum value. * std::chrono::duration can be negative and can overflow. - * 2) TDuration uses integer number of microseconds. - * std::chrono::duration is flexible, can be integer of floating point, + * 2) TDuration uses an integer number of microseconds. + * std::chrono::duration is flexible, can be an integer of a floating point, * can have different precisions. - * So when casted from std::chrono::duration to TDuration value is clamped and rounded. + * So when casted from std::chrono::duration to TDuration its value is clamped and rounded. * In arithmetic operations std::chrono::duration argument is only rounded, - * result is TDuration and it clamped and rounded. + * result is TDuration and it is clamped and rounded. * In comparisons std::chrono::duration argument is rounded. */ template <typename T, typename TRatio> @@ -283,8 +283,8 @@ public: static_assert( std::ratio_greater_equal<TRatio, std::micro>::value && (!std::is_floating_point<T>::value || std::ratio_greater<TRatio, std::micro>::value), - "Extremely likely it is loss of precision, because TDuration stores microseconds. " - "Cast you duration explicitly to microseconds if you really need it."); + "Extremely likely it is a loss of precision, because TDuration stores microseconds. " + "Cast 'duration' explicitly to microseconds if you really need it."); if (duration.count() < 0) { *this = TDuration::Zero(); // clamp from the bottom @@ -391,7 +391,7 @@ struct THash<TDuration> { } }; -/// TInstant and TDuration are guaranteed to have same precision +/// TInstant and TDuration are guaranteed to have the same precision class TInstant: public TTimeBase<TInstant> { using TBase = TTimeBase<TInstant>; @@ -517,7 +517,7 @@ public: /** * Formats the instant using the system time zone, with microsecond precision. * - * @returns A semi-ISO 8601 formatted string with timezone without colon, + * @returns A semi-ISO 8601 formatted string with a timezone without a colon, * e.g. '2015-11-22T04:30:27.991669+0500'. */ TString ToStringLocal() const; @@ -540,7 +540,7 @@ public: /** * Formats the instant using the system time zone, with second precision. * - * @returns A semi-ISO 8601 formatted string with timezone without colon, + * @returns A semi-ISO 8601 formatted string with a timezone without a colon, * e.g. '2015-11-22T04:30:27+0500'. */ TString ToStringLocalUpToSeconds() const; @@ -559,22 +559,22 @@ public: /// ISO 8601 Representation of Dates and Times /// - /// @link https://www.iso.org/standard/40874.html Description of format. + /// @link https://www.iso.org/standard/40874.html Description of the format. static bool TryParseIso8601(TStringBuf input, TInstant& instant); /// RFC 822 Date and Time specification /// - /// @link https://tools.ietf.org/html/rfc822#section-5 Description of format. + /// @link https://tools.ietf.org/html/rfc822#section-5 Description of the format. static bool TryParseRfc822(TStringBuf input, TInstant& instant); /// RFC 2616 3.3.1 Full Date /// - /// @link https://tools.ietf.org/html/rfc2616#section-3.3.1 Description of format. + /// @link https://tools.ietf.org/html/rfc2616#section-3.3.1 Description of the format. static bool TryParseHttp(TStringBuf input, TInstant& instant); /// X.509 certificate validity time (see rfc5280 4.1.2.5.*) /// - /// @link https://tools.ietf.org/html/rfc5280#section-4.1.2.5 Description of format. + /// @link https://tools.ietf.org/html/rfc5280#section-4.1.2.5 Description of the format. static bool TryParseX509(TStringBuf input, TInstant& instant); static TInstant ParseIso8601Deprecated(TStringBuf); |
