diff --git a/tz.html b/tz.html
index 733d279..c7d254e 100644
--- a/tz.html
+++ b/tz.html
@@ -26,7 +26,7 @@
Howard E. Hinnant
-2017-02-26
+2017-03-02
make_zoned
to_stream
format
from_stream
parse
utc_clock
tai_clock
zoned_time
it is the value returned by
-parse
from_stream
--One can parse in a
- -year_month_day
,sys_time<Duration>
, -local_time<Duration>
,utc_time<Duration>
, -tai_time<Duration>
,gps_time<Duration>
, -or aduration<Rep, Period>
. -Optionally, one can also pass in a reference -to astd::string
in order to capture the time zone abbreviation, or one -can pass in a reference to astd::chrono::minutes
to capture a time zone -UTC offset (formatted as+0000
), or one can pass in both in either order. --Each of the functions below return a
parse_manip
manipulator which is -specialized on the type to be parsed, and which can be used to extract the desired -information from a stream. --template <class Parsable, class CharT, class Traits = std::char_traits<CharT>> -struct parse_manip; +template <class CharT, class Traits> +void +from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt, + year_month_day& ymd, std::basic_string<CharT, Traits>* abbrev = nullptr, + std::chrono::minutes* offset = nullptr); -template <class Parsable, class CharT, class Traits> -typename parse_manip<Parsable, CharT, Traits>::type -parse(const std::basic_string<CharT, Traits>& format, Parsable& tp); +template <class Duration, class CharT, class Traits> +void +from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt, + sys_time<Duration>& tp, std::basic_string<CharT, Traits>* abbrev = nullptr, + std::chrono::minutes* offset = nullptr); -template <class Parsable, class CharT, class Traits> -typename parse_manip<Parsable, CharT, Traits>::type -parse(const std::basic_string<CharT, Traits>& format, Parsable& tp, - std::basic_string<CharT, Traits>& abbrev); +template <class Duration, class CharT, class Traits> +void +from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt, + local_time<Duration>& tp, std::basic_string<CharT, Traits>* abbrev = nullptr, + std::chrono::minutes* offset = nullptr); -template <class Parsable, class CharT, class Traits> -typename parse_manip<Parsable, CharT, Traits>::type -parse(const std::basic_string<CharT, Traits>& format, Parsable& tp, - std::chrono::minutes& offset); +template <class Rep, class Period, class CharT, class Traits> +void +from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt, + std::chrono::duration<Rep, Period>& d, + std::basic_string<CharT, Traits>* abbrev = nullptr, + std::chrono::minutes* offset = nullptr); -template <class Parsable, class CharT, class Traits> -typename parse_manip<Parsable, CharT, Traits>::type -parse(const std::basic_string<CharT, Traits>& format, Parsable& tp, - std::basic_string<CharT, Traits>& abbrev, std::chrono::minutes& offset); +template <class Duration, class CharT, class Traits> +void +from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt, + utc_time<Duration>& tp, std::basic_string<CharT, Traits>* abbrev = nullptr, + std::chrono::minutes* offset = nullptr); -// const CharT* formats +template <class Duration, class CharT, class Traits> +void +from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt, + tai_time<Duration>& tp, std::basic_string<CharT, Traits>* abbrev = nullptr, + std::chrono::minutes* offset = nullptr); -template <class Parsable, class CharT> -typename parse_manip<Parsable, CharT>::type -parse(const CharT* format, Parsable& tp); - -template <class Parsable, class CharT, class Traits> -typename parse_manip<Parsable, CharT>::type -parse(const CharT* format, Parsable& tp, std::basic_string<CharT, Traits>& abbrev); - -template <class Parsable, class CharT> -typename parse_manip<Parsable, CharT>::type -parse(const CharT* format, Parsable& tp, std::chrono::minutes& offset); - -template <class Parsable, class CharT, class Traits> -typename parse_manip<Parsable, CharT>::type -parse(const CharT* format, Parsable& tp, - std::basic_string<CharT, Traits>& abbrev, std::chrono::minutes& offset); +template <class Duration, class CharT, class Traits> +void +from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt, + gps_time<Duration>& tp, std::basic_string<CharT, Traits>* abbrev = nullptr, + std::chrono::minutes* offset = nullptr);++Effects: These functions attempt to parse an object out of -
is
according toformat
. If the parse is unsuccessful, +is
according tofmt
. If the parse is unsuccessful, callsis.setstate(std::ios::failbit)
which may throw an exception. -tp
,abbrev
, andoffset
are altered only in -the event of a successful parse. +tp
,*abbrev
, and*offset
are altered only in +the event of a successful parse, for the latter two, only if they are not equal to +nullptr
.@@ -2253,23 +2242,24 @@ If
%F
appears in theformat
string it is interpreted a-If
%S
or%T
appears in theformat
string -and the argumenttp
has precision finer than seconds, then the -seconds are parsed as adouble
, and if that parse is successful +If%S
or%T
appears in theformat
string and the +argumenttp
has precision that is not implicitly convertible to seconds, then +the seconds are parsed as adouble
, and if that parse is successful contributes to the time stamp as if -round<Duration>(duration<double>{s})
where -s
is a local variable holding the parseddouble
. +round<Duration>(duration<double>{s})
wheres
is a +local variable holding the parseddouble
.If
@@ -2285,11 +2275,13 @@ hours digit is optional:%z
appears in theformat
string and an offset is -successfully parsed, the overloads takingsys_time
interprets the +successfully parsed, the overloads takingsys_time
,utc_time
, +tai_time
andgps_time
interpret the parsed time as a local time and subtracts the offset prior to assigning the value totp
, resulting in a value oftp
representing a -UTC timestamp. The overloads takinglocal_time
require a valid -parse of the offset, but then ignore the offset in assigning a value to the -local_time<Duration>& tp
. Ifoffset
is -passed in, on successful parse it will hold the value represented by +UTC timestamp. The remaining overloads require a valid +parse of the offset, but then ignore the offset in assigning a value to +tp
. Ifoffset
is not equal tonullptr
, +on successful parse*offset
will hold the value represented by%z
if present, or will be assigned0min
if%z
is not present.@@ -2304,6 +2296,56 @@ Given a UTC offset, one might even narrow that list down further. If
%Z
appears in theformat
string then an abbreviation is required in that position for a successful parse. The -abbreviation will be parsed as astd::string
(delimited by white +abbreviation will be parsed as astd::basic_string<CharT, Traits>
+(delimited by white space). The parsed abbreviation does not have to be a valid time zone -abbreviation, and has no impact on the value parsed intotp
. Using -the overloads that take astd::string&
one can discover what -that parsed abbreviation is. On successful parse,abbrev
will be +abbreviation, and has no impact on the value parsed intotp
. If +abbrev
is not equal tonullptr
one can discover what +that parsed abbreviation is. On successful parse, and ifabbrev != nullptr
, +*abbrev
will be assigned the value represented by%Z
if present, or assigned the empty string if%Z
is not present.+
parse
+++Each of the functions below return a manipulator which can be used to extract the +desired information from a stream. These functions do not participate in overload +resolution unless
+ +Parsable
has a correspondingfrom_stream
+overload. ++template <class Parsable, class CharT, class Traits> +unspecified +parse(const std::basic_string<CharT, Traits>& format, Parsable& tp); + +template <class Parsable, class CharT, class Traits> +unspecified +parse(const std::basic_string<CharT, Traits>& format, Parsable& tp, + std::basic_string<CharT, Traits>& abbrev); + +template <class Parsable, class CharT, class Traits> +unspecified +parse(const std::basic_string<CharT, Traits>& format, Parsable& tp, + std::chrono::minutes& offset); + +template <class Parsable, class CharT, class Traits> +unspecified +parse(const std::basic_string<CharT, Traits>& format, Parsable& tp, + std::basic_string<CharT, Traits>& abbrev, std::chrono::minutes& offset); + +// const CharT* formats + +template <class Parsable, class CharT> +unspecified +parse(const CharT* format, Parsable& tp); + +template <class Parsable, class CharT, class Traits> +unspecified +parse(const CharT* format, Parsable& tp, std::basic_string<CharT, Traits>& abbrev); + +template <class Parsable, class CharT> +unspecified +parse(const CharT* format, Parsable& tp, std::chrono::minutes& offset); + +template <class Parsable, class CharT, class Traits> +unspecified +parse(const CharT* format, Parsable& tp, + std::basic_string<CharT, Traits>& abbrev, std::chrono::minutes& offset); ++
utc_clock