about summary refs log tree commit diff
path: root/absl/time
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2018-08-21T18·31-0700
committerDerek Mauro <dmauro@google.com>2018-08-22T15·02-0400
commitbed5bd6e185c7e0311f3a1f2dab4c96083dac636 (patch)
tree0a552d0018ff8dc508c3db1b31087d687abb5767 /absl/time
parentfefc83638fb69395d259ed245699310610429064 (diff)
Export of internal Abseil changes.
--
f4bb8afa9376b4120f56f3beff7b07260da4a5c2 by CJ Johnson <johnsoncj@google.com>:

Add user to Github list

PiperOrigin-RevId: 209630262
GitOrigin-RevId: f4bb8afa9376b4120f56f3beff7b07260da4a5c2
Change-Id: I3fedf35011d805ee4a20b92e073b43523b47d15b
Diffstat (limited to 'absl/time')
-rw-r--r--absl/time/duration.cc14
-rw-r--r--absl/time/format.cc2
-rw-r--r--absl/time/internal/cctz/include/cctz/civil_time.h2
-rw-r--r--absl/time/internal/cctz/include/cctz/time_zone.h8
-rw-r--r--absl/time/internal/cctz/src/time_zone_format.cc2
-rw-r--r--absl/time/internal/cctz/src/time_zone_info.cc2
-rw-r--r--absl/time/internal/cctz/src/time_zone_posix.h2
-rw-r--r--absl/time/time.h24
8 files changed, 28 insertions, 28 deletions
diff --git a/absl/time/duration.cc b/absl/time/duration.cc
index f402137b0a65..2950c7cdc632 100644
--- a/absl/time/duration.cc
+++ b/absl/time/duration.cc
@@ -666,7 +666,7 @@ std::chrono::hours ToChronoHours(Duration d) {
 }
 
 //
-// To/From std::string formatting.
+// To/From string formatting.
 //
 
 namespace {
@@ -744,7 +744,7 @@ void AppendNumberUnit(std::string* out, double n, DisplayUnit unit) {
 }  // namespace
 
 // From Go's doc at http://golang.org/pkg/time/#Duration.String
-//   [FormatDuration] returns a std::string representing the duration in the
+//   [FormatDuration] returns a string representing the duration in the
 //   form "72h3m0.5s".  Leading zero units are omitted.  As a special
 //   case, durations less than one second format use a smaller unit
 //   (milli-, micro-, or nanoseconds) to ensure that the leading digit
@@ -787,8 +787,8 @@ std::string FormatDuration(Duration d) {
 namespace {
 
 // A helper for ParseDuration() that parses a leading number from the given
-// std::string and stores the result in *int_part/*frac_part/*frac_scale.  The
-// given std::string pointer is modified to point to the first unconsumed char.
+// string and stores the result in *int_part/*frac_part/*frac_scale.  The
+// given string pointer is modified to point to the first unconsumed char.
 bool ConsumeDurationNumber(const char** dpp, int64_t* int_part,
                            int64_t* frac_part, int64_t* frac_scale) {
   *int_part = 0;
@@ -816,8 +816,8 @@ bool ConsumeDurationNumber(const char** dpp, int64_t* int_part,
 }
 
 // A helper for ParseDuration() that parses a leading unit designator (e.g.,
-// ns, us, ms, s, m, h) from the given std::string and stores the resulting unit
-// in "*unit".  The given std::string pointer is modified to point to the first
+// ns, us, ms, s, m, h) from the given string and stores the resulting unit
+// in "*unit".  The given string pointer is modified to point to the first
 // unconsumed char.
 bool ConsumeDurationUnit(const char** start, Duration* unit) {
   const char *s = *start;
@@ -850,7 +850,7 @@ bool ConsumeDurationUnit(const char** start, Duration* unit) {
 }  // namespace
 
 // From Go's doc at http://golang.org/pkg/time/#ParseDuration
-//   [ParseDuration] parses a duration std::string.  A duration std::string is
+//   [ParseDuration] parses a duration string.  A duration string is
 //   a possibly signed sequence of decimal numbers, each with optional
 //   fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m".
 //   Valid time units are "ns", "us" "ms", "s", "m", "h".
diff --git a/absl/time/format.cc b/absl/time/format.cc
index e98e60a372bf..ee597e407a9d 100644
--- a/absl/time/format.cc
+++ b/absl/time/format.cc
@@ -88,7 +88,7 @@ bool ParseTime(const std::string& format, const std::string& input, absl::Time*
   return absl::ParseTime(format, input, absl::UTCTimeZone(), time, err);
 }
 
-// If the input std::string does not contain an explicit UTC offset, interpret
+// If the input string does not contain an explicit UTC offset, interpret
 // the fields with respect to the given TimeZone.
 bool ParseTime(const std::string& format, const std::string& input, absl::TimeZone tz,
                absl::Time* time, std::string* err) {
diff --git a/absl/time/internal/cctz/include/cctz/civil_time.h b/absl/time/internal/cctz/include/cctz/civil_time.h
index 898222b4c7af..0842fa4a4689 100644
--- a/absl/time/internal/cctz/include/cctz/civil_time.h
+++ b/absl/time/internal/cctz/include/cctz/civil_time.h
@@ -59,7 +59,7 @@ namespace cctz {
 // inferior fields to their minimum valid value (as described above). The
 // following are examples of how each of the six types would align the fields
 // representing November 22, 2015 at 12:34:56 in the afternoon. (Note: the
-// std::string format used here is not important; it's just a shorthand way of
+// string format used here is not important; it's just a shorthand way of
 // showing the six YMDHMS fields.)
 //
 //   civil_second  2015-11-22 12:34:56
diff --git a/absl/time/internal/cctz/include/cctz/time_zone.h b/absl/time/internal/cctz/include/cctz/time_zone.h
index 0b9764ea72a9..c86a555250ed 100644
--- a/absl/time/internal/cctz/include/cctz/time_zone.h
+++ b/absl/time/internal/cctz/include/cctz/time_zone.h
@@ -279,7 +279,7 @@ bool parse(const std::string&, const std::string&, const time_zone&,
 }  // namespace detail
 
 // Formats the given time_point in the given cctz::time_zone according to
-// the provided format std::string. Uses strftime()-like formatting options,
+// the provided format string. Uses strftime()-like formatting options,
 // with the following extensions:
 //
 //   - %Ez  - RFC3339-compatible numeric UTC offset (+hh:mm or -hh:mm)
@@ -298,7 +298,7 @@ bool parse(const std::string&, const std::string&, const time_zone&,
 // more than four characters, just like %Y.
 //
 // Tip: Format strings should include the UTC offset (e.g., %z, %Ez, or %E*z)
-// so that the resulting std::string uniquely identifies an absolute time.
+// so that the resulting string uniquely identifies an absolute time.
 //
 // Example:
 //   cctz::time_zone lax;
@@ -314,7 +314,7 @@ inline std::string format(const std::string& fmt, const time_point<D>& tp,
   return detail::format(fmt, p.first, n, tz);
 }
 
-// Parses an input std::string according to the provided format std::string and
+// Parses an input string according to the provided format string and
 // returns the corresponding time_point. Uses strftime()-like formatting
 // options, with the same extensions as cctz::format(), but with the
 // exceptions that %E#S is interpreted as %E*S, and %E#f as %E*f. %Ez
@@ -328,7 +328,7 @@ inline std::string format(const std::string& fmt, const time_point<D>& tp,
 //
 //   "1970-01-01 00:00:00.0 +0000"
 //
-// For example, parsing a std::string of "15:45" (%H:%M) will return a time_point
+// For example, parsing a string of "15:45" (%H:%M) will return a time_point
 // that represents "1970-01-01 15:45:00.0 +0000".
 //
 // Note that parse() returns time instants, so it makes most sense to parse
diff --git a/absl/time/internal/cctz/src/time_zone_format.cc b/absl/time/internal/cctz/src/time_zone_format.cc
index 1b023848efa1..d9714092466a 100644
--- a/absl/time/internal/cctz/src/time_zone_format.cc
+++ b/absl/time/internal/cctz/src/time_zone_format.cc
@@ -533,7 +533,7 @@ const char* ParseSubSeconds(const char* dp, detail::femtoseconds* subseconds) {
   return dp;
 }
 
-// Parses a std::string into a std::tm using strptime(3).
+// Parses a string into a std::tm using strptime(3).
 const char* ParseTM(const char* dp, const char* fmt, std::tm* tm) {
   if (dp != nullptr) {
     dp = strptime(dp, fmt, tm);
diff --git a/absl/time/internal/cctz/src/time_zone_info.cc b/absl/time/internal/cctz/src/time_zone_info.cc
index bf73635d4c6a..2cb358d048e2 100644
--- a/absl/time/internal/cctz/src/time_zone_info.cc
+++ b/absl/time/internal/cctz/src/time_zone_info.cc
@@ -286,7 +286,7 @@ bool TimeZoneInfo::EquivTransitions(std::uint_fast8_t tt1_index,
   return true;
 }
 
-// Use the POSIX-TZ-environment-variable-style std::string to handle times
+// Use the POSIX-TZ-environment-variable-style string to handle times
 // in years after the last transition stored in the zoneinfo data.
 void TimeZoneInfo::ExtendTransitions(const std::string& name,
                                      const Header& hdr) {
diff --git a/absl/time/internal/cctz/src/time_zone_posix.h b/absl/time/internal/cctz/src/time_zone_posix.h
index 6619f27edcf6..9ccd4a8b68bd 100644
--- a/absl/time/internal/cctz/src/time_zone_posix.h
+++ b/absl/time/internal/cctz/src/time_zone_posix.h
@@ -89,7 +89,7 @@ struct PosixTransition {
   } time;
 };
 
-// The entirety of a POSIX-std::string specified time-zone rule. The standard
+// The entirety of a POSIX-string specified time-zone rule. The standard
 // abbreviation and offset are always given. If the time zone includes
 // daylight saving, then the daylight abbrevation is non-empty and the
 // remaining fields are also valid. Note that the start/end transitions
diff --git a/absl/time/time.h b/absl/time/time.h
index c41cb89c5eff..d29d7e9a2061 100644
--- a/absl/time/time.h
+++ b/absl/time/time.h
@@ -481,7 +481,7 @@ std::chrono::hours ToChronoHours(Duration d);
 
 // FormatDuration()
 //
-// Returns a std::string representing the duration in the form "72h3m0.5s".
+// Returns a string representing the duration in the form "72h3m0.5s".
 // Returns "inf" or "-inf" for +/- `InfiniteDuration()`.
 std::string FormatDuration(Duration d);
 
@@ -492,7 +492,7 @@ inline std::ostream& operator<<(std::ostream& os, Duration d) {
 
 // ParseDuration()
 //
-// Parses a duration std::string consisting of a possibly signed sequence of
+// Parses a duration string consisting of a possibly signed sequence of
 // decimal numbers, each with an optional fractional part and a unit
 // suffix.  The valid suffixes are "ns", "us" "ms", "s", "m", and "h".
 // Simple examples include "300ms", "-1.5h", and "2h45m".  Parses "0" as
@@ -886,7 +886,7 @@ extern const char RFC1123_no_wday[];  // %d %b %E4Y %H:%M:%S %z
 // FormatTime()
 //
 // Formats the given `absl::Time` in the `absl::TimeZone` according to the
-// provided format std::string. Uses strftime()-like formatting options, with
+// provided format string. Uses strftime()-like formatting options, with
 // the following extensions:
 //
 //   - %Ez  - RFC3339-compatible numeric UTC offset (+hh:mm or -hh:mm)
@@ -913,13 +913,13 @@ extern const char RFC1123_no_wday[];  // %d %b %E4Y %H:%M:%S %z
 //   if (!absl::LoadTimeZone("America/Los_Angeles", &lax)) { ... }
 //   absl::Time t = absl::FromDateTime(2013, 1, 2, 3, 4, 5, lax);
 //
-//   std::string f = absl::FormatTime("%H:%M:%S", t, lax);  // "03:04:05"
+//   string f = absl::FormatTime("%H:%M:%S", t, lax);  // "03:04:05"
 //   f = absl::FormatTime("%H:%M:%E3S", t, lax);  // "03:04:05.000"
 //
 // Note: If the given `absl::Time` is `absl::InfiniteFuture()`, the returned
-// std::string will be exactly "infinite-future". If the given `absl::Time` is
-// `absl::InfinitePast()`, the returned std::string will be exactly "infinite-past".
-// In both cases the given format std::string and `absl::TimeZone` are ignored.
+// string will be exactly "infinite-future". If the given `absl::Time` is
+// `absl::InfinitePast()`, the returned string will be exactly "infinite-past".
+// In both cases the given format string and `absl::TimeZone` are ignored.
 //
 std::string FormatTime(const std::string& format, Time t, TimeZone tz);
 
@@ -936,7 +936,7 @@ inline std::ostream& operator<<(std::ostream& os, Time t) {
 
 // ParseTime()
 //
-// Parses an input std::string according to the provided format std::string and
+// Parses an input string according to the provided format string and
 // returns the corresponding `absl::Time`. Uses strftime()-like formatting
 // options, with the same extensions as FormatTime(), but with the
 // exceptions that %E#S is interpreted as %E*S, and %E#f as %E*f.  %Ez
@@ -950,7 +950,7 @@ inline std::ostream& operator<<(std::ostream& os, Time t) {
 //
 //   "1970-01-01 00:00:00.0 +0000"
 //
-// For example, parsing a std::string of "15:45" (%H:%M) will return an absl::Time
+// For example, parsing a string of "15:45" (%H:%M) will return an absl::Time
 // that represents "1970-01-01 15:45:00.0 +0000".
 //
 // Note that since ParseTime() returns time instants, it makes the most sense
@@ -977,15 +977,15 @@ inline std::ostream& operator<<(std::ostream& os, Time t) {
 // Errors are indicated by returning false and assigning an error message
 // to the "err" out param if it is non-null.
 //
-// Note: If the input std::string is exactly "infinite-future", the returned
+// Note: If the input string is exactly "infinite-future", the returned
 // `absl::Time` will be `absl::InfiniteFuture()` and `true` will be returned.
-// If the input std::string is "infinite-past", the returned `absl::Time` will be
+// If the input string is "infinite-past", the returned `absl::Time` will be
 // `absl::InfinitePast()` and `true` will be returned.
 //
 bool ParseTime(const std::string& format, const std::string& input, Time* time,
                std::string* err);
 
-// Like ParseTime() above, but if the format std::string does not contain a UTC
+// Like ParseTime() above, but if the format string does not contain a UTC
 // offset specification (%z/%Ez/%E*z) then the input is interpreted in the
 // given TimeZone.  This means that the input, by itself, does not identify a
 // unique instant.  Being time-zone dependent, it also admits the possibility