From Jason Turner

[time.zone]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpi_ljtuem/{from.md → to.md} +19 -18
tmp/tmpi_ljtuem/{from.md → to.md} RENAMED
@@ -41,11 +41,11 @@ const time_zone* locate_zone(string_view tz_name) const;
41
 
42
  [*Note 1*: A `time_zone_link` specifies an alternative name for a
43
  `time_zone`. — *end note*]
44
 
45
  *Throws:* If a `const time_zone*` cannot be found as described in the
46
- *Returns:* clause, throws a `runtime_error`.
47
 
48
  [*Note 2*: On non-exceptional return, the return value is always a
49
  pointer to a valid `time_zone`. — *end note*]
50
 
51
  ``` cpp
@@ -113,19 +113,19 @@ const_iterator erase_after(const_iterator p);
113
 
114
  *Preconditions:* The iterator following `p` is dereferenceable.
115
 
116
  *Effects:* Erases the `tzdb` referred to by the iterator following `p`.
117
 
118
- *Returns:* An iterator pointing to the element following the one that
119
- was erased, or `end()` if no such element exists.
120
-
121
  *Ensures:* No pointers, references, or iterators are invalidated except
122
  those referring to the erased `tzdb`.
123
 
124
  [*Note 2*: It is not possible to erase the `tzdb` referred to by
125
  `begin()`. — *end note*]
126
 
 
 
 
127
  *Throws:* Nothing.
128
 
129
  ``` cpp
130
  const_iterator begin() const noexcept;
131
  ```
@@ -646,32 +646,32 @@ namespace std::chrono {
646
  zoned_time(const sys_time<Duration>& st);
647
  explicit zoned_time(TimeZonePtr z);
648
  explicit zoned_time(string_view name);
649
 
650
  template<class Duration2>
651
- zoned_time(const zoned_time<Duration2, TimeZonePtr>& zt);
652
 
653
  zoned_time(TimeZonePtr z, const sys_time<Duration>& st);
654
  zoned_time(string_view name, const sys_time<Duration>& st);
655
 
656
  zoned_time(TimeZonePtr z, const local_time<Duration>& tp);
657
  zoned_time(string_view name, const local_time<Duration>& tp);
658
  zoned_time(TimeZonePtr z, const local_time<Duration>& tp, choose c);
659
  zoned_time(string_view name, const local_time<Duration>& tp, choose c);
660
 
661
  template<class Duration2, class TimeZonePtr2>
662
- zoned_time(TimeZonePtr z, const zoned_time<Duration2, TimeZonePtr2>& zt);
663
  template<class Duration2, class TimeZonePtr2>
664
- zoned_time(TimeZonePtr z, const zoned_time<Duration2, TimeZonePtr2>& zt, choose);
665
 
666
  template<class Duration2, class TimeZonePtr2>
667
- zoned_time(string_view name, const zoned_time<Duration2, TimeZonePtr2>& zt);
668
  template<class Duration2, class TimeZonePtr2>
669
- zoned_time(string_view name, const zoned_time<Duration2, TimeZonePtr2>& zt, choose);
670
 
671
  zoned_time& operator=(const sys_time<Duration>& st);
672
- zoned_time& operator=(const local_time<Duration>& ut);
673
 
674
  operator sys_time<duration>() const;
675
  explicit operator local_time<duration>() const;
676
 
677
  TimeZonePtr get_time_zone() const;
@@ -797,22 +797,22 @@ zoned_time(string_view name, const sys_time<Duration>& st);
797
 
798
  ``` cpp
799
  zoned_time(TimeZonePtr z, const local_time<Duration>& tp);
800
  ```
801
 
802
- *Preconditions:* `z` refers to a time zone.
803
-
804
  *Constraints:*
805
 
806
  ``` cpp
807
  is_convertible_v<
808
  decltype(declval<TimeZonePtr&>()->to_sys(local_time<Duration>{})),
809
  sys_time<duration>>
810
  ```
811
 
812
  is `true`.
813
 
 
 
814
  *Effects:* Initializes `zone_` with `std::move(z)` and `tp_` with
815
  `zone_->to_sys(tp)`.
816
 
817
  ``` cpp
818
  zoned_time(string_view name, const local_time<Duration>& tp);
@@ -826,22 +826,22 @@ zoned_time(string_view name, const local_time<Duration>& tp);
826
 
827
  ``` cpp
828
  zoned_time(TimeZonePtr z, const local_time<Duration>& tp, choose c);
829
  ```
830
 
831
- *Preconditions:* `z` refers to a time zone.
832
-
833
  *Constraints:*
834
 
835
  ``` cpp
836
  is_convertible_v<
837
  decltype(declval<TimeZonePtr&>()->to_sys(local_time<Duration>{}, choose::earliest)),
838
  sys_time<duration>>
839
  ```
840
 
841
  is `true`.
842
 
 
 
843
  *Effects:* Initializes `zone_` with `std::move(z)` and `tp_` with
844
  `zone_->to_sys(tp, c)`.
845
 
846
  ``` cpp
847
  zoned_time(string_view name, const local_time<Duration>& tp, choose c);
@@ -977,14 +977,15 @@ template<class charT, class traits, class Duration, class TimeZonePtr>
977
  basic_ostream<charT, traits>&
978
  operator<<(basic_ostream<charT, traits>& os,
979
  const zoned_time<Duration, TimeZonePtr>& t);
980
  ```
981
 
982
- *Effects:* Streams the value returned from `t.get_local_time()` to `os`
983
- using the format `"%F %T %Z"`.
984
 
985
- *Returns:* `os`.
 
 
986
 
987
  ### Class `leap_second` <a id="time.zone.leap">[[time.zone.leap]]</a>
988
 
989
  #### Overview <a id="time.zone.leap.overview">[[time.zone.leap.overview]]</a>
990
 
@@ -1062,11 +1063,11 @@ constexpr seconds value() const noexcept;
1062
  ```
1063
 
1064
  *Returns:* `+1s` to indicate a positive leap second or `-1s` to indicate
1065
  a negative leap second.
1066
 
1067
- [*Note 1*: All leap seconds inserted up through 2019 were positive leap
1068
  seconds. — *end note*]
1069
 
1070
  #### Non-member functions <a id="time.zone.leap.nonmembers">[[time.zone.leap.nonmembers]]</a>
1071
 
1072
  ``` cpp
 
41
 
42
  [*Note 1*: A `time_zone_link` specifies an alternative name for a
43
  `time_zone`. — *end note*]
44
 
45
  *Throws:* If a `const time_zone*` cannot be found as described in the
46
+ *Returns:* element, throws a `runtime_error`.
47
 
48
  [*Note 2*: On non-exceptional return, the return value is always a
49
  pointer to a valid `time_zone`. — *end note*]
50
 
51
  ``` cpp
 
113
 
114
  *Preconditions:* The iterator following `p` is dereferenceable.
115
 
116
  *Effects:* Erases the `tzdb` referred to by the iterator following `p`.
117
 
 
 
 
118
  *Ensures:* No pointers, references, or iterators are invalidated except
119
  those referring to the erased `tzdb`.
120
 
121
  [*Note 2*: It is not possible to erase the `tzdb` referred to by
122
  `begin()`. — *end note*]
123
 
124
+ *Returns:* An iterator pointing to the element following the one that
125
+ was erased, or `end()` if no such element exists.
126
+
127
  *Throws:* Nothing.
128
 
129
  ``` cpp
130
  const_iterator begin() const noexcept;
131
  ```
 
646
  zoned_time(const sys_time<Duration>& st);
647
  explicit zoned_time(TimeZonePtr z);
648
  explicit zoned_time(string_view name);
649
 
650
  template<class Duration2>
651
+ zoned_time(const zoned_time<Duration2, TimeZonePtr>& y);
652
 
653
  zoned_time(TimeZonePtr z, const sys_time<Duration>& st);
654
  zoned_time(string_view name, const sys_time<Duration>& st);
655
 
656
  zoned_time(TimeZonePtr z, const local_time<Duration>& tp);
657
  zoned_time(string_view name, const local_time<Duration>& tp);
658
  zoned_time(TimeZonePtr z, const local_time<Duration>& tp, choose c);
659
  zoned_time(string_view name, const local_time<Duration>& tp, choose c);
660
 
661
  template<class Duration2, class TimeZonePtr2>
662
+ zoned_time(TimeZonePtr z, const zoned_time<Duration2, TimeZonePtr2>& y);
663
  template<class Duration2, class TimeZonePtr2>
664
+ zoned_time(TimeZonePtr z, const zoned_time<Duration2, TimeZonePtr2>& y, choose);
665
 
666
  template<class Duration2, class TimeZonePtr2>
667
+ zoned_time(string_view name, const zoned_time<Duration2, TimeZonePtr2>& y);
668
  template<class Duration2, class TimeZonePtr2>
669
+ zoned_time(string_view name, const zoned_time<Duration2, TimeZonePtr2>& y, choose c);
670
 
671
  zoned_time& operator=(const sys_time<Duration>& st);
672
+ zoned_time& operator=(const local_time<Duration>& lt);
673
 
674
  operator sys_time<duration>() const;
675
  explicit operator local_time<duration>() const;
676
 
677
  TimeZonePtr get_time_zone() const;
 
797
 
798
  ``` cpp
799
  zoned_time(TimeZonePtr z, const local_time<Duration>& tp);
800
  ```
801
 
 
 
802
  *Constraints:*
803
 
804
  ``` cpp
805
  is_convertible_v<
806
  decltype(declval<TimeZonePtr&>()->to_sys(local_time<Duration>{})),
807
  sys_time<duration>>
808
  ```
809
 
810
  is `true`.
811
 
812
+ *Preconditions:* `z` refers to a time zone.
813
+
814
  *Effects:* Initializes `zone_` with `std::move(z)` and `tp_` with
815
  `zone_->to_sys(tp)`.
816
 
817
  ``` cpp
818
  zoned_time(string_view name, const local_time<Duration>& tp);
 
826
 
827
  ``` cpp
828
  zoned_time(TimeZonePtr z, const local_time<Duration>& tp, choose c);
829
  ```
830
 
 
 
831
  *Constraints:*
832
 
833
  ``` cpp
834
  is_convertible_v<
835
  decltype(declval<TimeZonePtr&>()->to_sys(local_time<Duration>{}, choose::earliest)),
836
  sys_time<duration>>
837
  ```
838
 
839
  is `true`.
840
 
841
+ *Preconditions:* `z` refers to a time zone.
842
+
843
  *Effects:* Initializes `zone_` with `std::move(z)` and `tp_` with
844
  `zone_->to_sys(tp, c)`.
845
 
846
  ``` cpp
847
  zoned_time(string_view name, const local_time<Duration>& tp, choose c);
 
977
  basic_ostream<charT, traits>&
978
  operator<<(basic_ostream<charT, traits>& os,
979
  const zoned_time<Duration, TimeZonePtr>& t);
980
  ```
981
 
982
+ *Effects:* Equivalent to:
 
983
 
984
+ ``` cpp
985
+ return os << format(os.getloc(), STATICALLY-WIDEN<charT>("{:L%F %T %Z}"), t);
986
+ ```
987
 
988
  ### Class `leap_second` <a id="time.zone.leap">[[time.zone.leap]]</a>
989
 
990
  #### Overview <a id="time.zone.leap.overview">[[time.zone.leap.overview]]</a>
991
 
 
1063
  ```
1064
 
1065
  *Returns:* `+1s` to indicate a positive leap second or `-1s` to indicate
1066
  a negative leap second.
1067
 
1068
+ [*Note 1*: All leap seconds inserted up through 2022 were positive leap
1069
  seconds. — *end note*]
1070
 
1071
  #### Non-member functions <a id="time.zone.leap.nonmembers">[[time.zone.leap.nonmembers]]</a>
1072
 
1073
  ``` cpp