diff --git a/d0355r5.html b/d0355r5.html
index 2628873..ac08565 100644
--- a/d0355r5.html
+++ b/d0355r5.html
@@ -37,7 +37,7 @@
Document number: D0355R5
Howard E. Hinnant
-2017-10-28
+2017-11-03
<chrono>
to Calendars and Time Zoneszoned_time
conversion among different TimeZonePtr
types.nonexistent_local_time
and
ambiguous_local_time
.@@ -4211,7 +4213,8 @@ explicit constexpr month::month(unsigned m) noexcept;Effects: Constructs an object of type
day
by constructing -d_
withd
. +d_
withd
. The value held is unspecified ifd
+is not in the range[0, 255]
.
@@ -4426,14 +4429,13 @@ constexpr months operator-(const month& x, const month& y) noexcept;Effects: Constructs an object of type
month
by constructing -m_
withm
. +m_
withm
. The value held is unspecified ifm
+is not in the range[0, 255]
.
-Requires:
x.ok() == true
andy.ok() == true
. +Returns: Ifx.ok() == true
andy.ok() == true
, +returns a value ofmonths
in the range ofmonths{0}
to +months{11}
inclusive. Otherwise the value returned is unspecified.-Returns: A value of
-months
in the range ofmonths{0}
to -months{11}
inclusive. --Remarks: The returned value
m
shall satisfy the equality: +Remarks: Ifx.ok() == true
andy.ok() == true
, +the returned valuem
shall satisfy the equality:y + m == x
.@@ -4584,7 +4586,8 @@ explicit constexpr year::year(int y) noexcept;
@@ -5002,7 +5005,8 @@ explicit constexpr weekday::weekday(unsigned wd) noexcept;Effects: Constructs an object of type
year
by constructing -y_
withy
. +y_
withy
. The value held is unspecified ify
+is not in the range[-32767, 32767]
.@@ -5229,14 +5233,13 @@ constexpr days operator-(const weekday& x, const weekday& y) noexcept;Effects: Constructs an object of type
weekday
by constructing -wd_
withwd
. +wd_
withwd
. The value held is unspecified ifwd
+is not in the range[0, 255]
.@@ -6721,16 +6726,15 @@ constexpr year_month_day::operator sys_days() const noexcept;-Requires:
x.ok() == true
andy.ok() == true
. +Returns: Ifx.ok() == true
andy.ok() == true
, +returns a value ofdays
in the range ofdays{0}
to +days{6}
inclusive. Otherwise the value returned is unspecified.-Returns: A value of
-days
in the range ofdays{0}
to -days{6}
inclusive. --Remarks: The returned value
d
shall satisfy the equality: +Remarks: Ifx.ok() == true
andy.ok() == true
, +the returned valued
shall satisfy the equality:y + d == x
.@@ -5365,6 +5368,8 @@ constexpr weekday_indexed::weekday_indexed(const chrono::weekday& wd, unsign
Effects: Constructs an object of type
weekday_indexed
by constructingwd_
withwd
andindex_
withindex
. +The values held are unspecified if!wd.ok()
orindex
is not +in the range[1, 5]
.-Requires:
-y_.ok() && m_.ok() == true
. -Returns: If
ok()
, returns asys_days
holding a count ofdays
from thesys_days
epoch to*this
(a negative value if*this
represents a date -prior to thesys_days
epoch). Otherwise returns a +prior to thesys_days
epoch). +Otherwise ify_.ok() && m_.ok() == true
returns asys_days
which is offset fromsys_days{y_/m_/last}
by the number ofdays
d_
is offset fromsys_days{y_/m_/last}.day()
. +Otherwise the value returned is unspecified.Remarks: A
sys_days
in the range @@ -6757,9 +6761,6 @@ constexpr explicit year_month_day::operator local_days() const noexcept;-Requires:
-y_.ok() && m_.ok() == true
. -Effects: Equivalent to:
@@ -6850,9 +6851,6 @@ constexpr year_month_day operator+(const year_month_day& ymd, const months&a-Requires:
-ymd.month().ok()
istrue
. -Returns:
(ymd.year() / ymd.month() + dm) / ymd.day()
.@@ -7154,9 +7152,6 @@ constexpr year_month_day_last::operator sys_days() const noexcept;
@@ -7167,9 +7162,6 @@ constexpr explicit year_month_day_last::operator local_days() const noexcept;-Requires:
-ok() == true
. -Effects: Equivalent to:
return sys_days{year()/month()/day()};
@@ -7252,17 +7244,7 @@ constexpr year_month_day_last operator+(const year_month_day_last& ymdl, con-Requires:
-ok() == true
. -Effects: Equivalent to:
return local_days{sys_days{*this}.time_since_epoch()};
@@ -7545,14 +7527,14 @@ constexpr year_month_weekday::operator sys_days() const noexcept;-Requires:
-ymdl.ok()
istrue
. --Returns:
-(ymdl.year() / ymdl.month() + dm) / last
. --Postconditions: The resultant
-year_month_day_last
returns -true
fromok()
. --Complexity: O(1) with respect to the value of
dm
. +Effects: Equivalent to:return (ymdl.year() / ymdl.month() + dm) / last
.@@ -7562,9 +7544,6 @@ constexpr explicit year_month_weekday::operator local_days() const noexcept;-Requires:
-y_.ok() && m_.ok() && wdi_.weekday().ok() == true
. --Returns: A
sys_days
which represents the date +Returns: Ify_.ok() && m_.ok() && wdi_.weekday().ok()
, +returns asys_days
which represents the date(index() - 1)*7
days after the firstweekday()
ofyear()/month()
. Ifindex()
is0
the returnedsys_days
represents the date 7 days prior to the firstweekday()
ofyear()/month()
. +Otherwise,!y_.ok() || !m_.ok() || !wdi_.weekday().ok()
and the returned +value is unspecified.@@ -7607,18 +7586,8 @@ constexpr year_month_weekday operator+(const year_month_weekday& ymwd, const-Requires:
-y_.ok() && m_.ok() && wdi_.weekday().ok() == true
. -Effects: Equivalent to:
return local_days{sys_days{*this}.time_since_epoch()};
-Requires:
-ymwd.ok()
istrue
. -Returns:
-(ymwd.year() / ymwd.month() + dm) / ymwd.weekday_indexed()
.-Postconditions: The resultant
-year_month_weekday
returns -true
fromok()
. --Complexity: O(1) with respect to the value of
dm
. -@@ -7879,11 +7848,9 @@ constexpr year_month_weekday_last::operator sys_days() const noexcept;@@ -7893,9 +7860,6 @@ constexpr explicit year_month_weekday_last::operator local_days() const noexcept-Requires:
-ok() == true
. --Returns: A
sys_days
which represents the last -weekday()
ofyear()/month()
. +Returns: Ifok() == true
, returns asys_days
which +represents the lastweekday()
ofyear()/month()
. Otherwise +the returned value is unspecified.@@ -7936,17 +7900,7 @@ constexpr year_month_weekday_last operator+(const year_month_weekday_last& y-Requires:
-ok() == true
. -Effects: Equivalent to:
return local_days{sys_days{*this}.time_since_epoch()};
diff --git a/date.html b/date.html index 238ec6e..6e9167a 100644 --- a/date.html +++ b/date.html @@ -26,7 +26,7 @@-Requires:
-ymwdl.ok()
istrue
. --Returns:
-(ymwdl.year() / ymwdl.month() + dm) / ymwdl.weekday_last()
. --Postconditions: The resultant
-year_month_weekday_last
returns -true
fromok()
. --Complexity: O(1) with respect to the value of
dm
. +Effects: Equivalent to:return (ymwdl.year() / ymwdl.month() + dm) / ymwdl.weekday_last()
.
Howard E. Hinnant
-2017-10-16
+2017-11-03
@@ -2100,7 +2100,8 @@ explicit constexpr day::day(unsigned d) noexcept;
date
@@ -2476,7 +2477,8 @@ explicit constexpr month::month(unsigned m) noexcept;Effects: Constructs an object of type
day
by constructing -d_
withd
. +d_
withd
. The value held is unspecified ifd
+is not in the range[0, 255]
.@@ -2690,14 +2692,13 @@ constexpr months operator-(const month& x, const month& y) noexcept;Effects: Constructs an object of type
month
by constructing -m_
withm
. +m_
withm
. The value held is unspecified ifm
+is not in the range[0, 255]
.-Requires:
x.ok() == true
andy.ok() == true
. +Returns: Ifx.ok() == true
andy.ok() == true
, +returns a value ofmonths
in the range ofmonths{0}
to +months{11}
inclusive. Otherwise the value returned is unspecified.-Returns: A value of
-months
in the range ofmonths{0}
to -months{11}
inclusive. --Remarks: The returned value
m
shall satisfy the equality: +Remarks: Ifx.ok() == true
andy.ok() == true
, +the returned valuem
shall satisfy the equality:y + m == x
.@@ -2864,7 +2865,8 @@ explicit constexpr year::year(int y) noexcept;
@@ -3302,7 +3304,8 @@ explicit constexpr weekday::weekday(unsigned wd) noexcept;Effects: Constructs an object of type
year
by constructing -y_
withy
. +y_
withy
. The value held is unspecified ify
+is not in the range[-32767, 32767]
.@@ -3528,14 +3531,13 @@ constexpr days operator-(const weekday& x, const weekday& y) noexcept;Effects: Constructs an object of type
weekday
by constructing -wd_
withwd
. +wd_
withwd
. The value held is unspecified ifwd
+is not in the range[0, 255]
.@@ -5116,16 +5120,32 @@ constexpr year_month_day::operator sys_days() const noexcept;-Requires:
x.ok() == true
andy.ok() == true
. +Returns: Ifx.ok() == true
andy.ok() == true
, +returns a value ofdays
in the range ofdays{0}
to +days{6}
inclusive. Otherwise the value returned is unspecified.-Returns: A value of
-days
in the range ofdays{0}
to -days{6}
inclusive. --Remarks: The returned value
d
shall satisfy the equality: +Remarks: Ifx.ok() == true
andy.ok() == true
, +the returned valued
shall satisfy the equality:y + d == x
.@@ -3674,6 +3676,8 @@ constexpr weekday_indexed::weekday_indexed(const date::weekday& wd, unsigned
Effects: Constructs an object of type
weekday_indexed
by constructingwd_
withwd
andindex_
withindex
. +The values held are unspecified if!wd.ok()
orindex
is not +in the range[1, 5]
.@@ -5135,16 +5155,11 @@ constexpr explicit year_month_day::operator local_days() const noexcept;-Requires:
ok() == true
. +Returns: Ifok()
, returns asys_days
+holding a count ofdays
from thesys_days
epoch to +*this
(a negative value if*this
represents a date +prior to thesys_days
epoch). +Otherwise ify_.ok() && m_.ok() == true
returns a +sys_days
which is offset from +sys_days{y_/m_/last}
by the number ofdays
+d_
is offset fromsys_days{y_/m_/last}.day()
. +Otherwise the value returned is unspecified.-Returns: A
sys_days
which represents the date represented by -*this
. +Remarks: Asys_days
in the range +[days{-12687428}, days{11248737}]
which is converted to a +year_month_day
, shall have the same value when converted +back to asys_days
.-Remarks: A
+sys_days
which is converted to ayear_month_day
, -shall have the same value when converted back to asys_days
. The round -trip conversion sequence shall be loss-less. +[Example: +++static_assert(year_month_day{sys_days{2017y/jan/0}} == 2016y/dec/31); +static_assert(year_month_day{sys_days{2017y/jan/31}} == 2017y/jan/31); +static_assert(year_month_day{sys_days{2017y/jan/32}} == 2017y/feb/1); ++—end example]
-Requires:
-ok() == true
. --Returns: A
-local_days
which represents the date represented by -*this
. --Remarks: Shall return a value equivalent to -
+local_days{static_cast<sys_days>(*this).time_since_epoch()}
. +Effects: Equivalent to:+return local_days{sys_days{*this}.time_since_epoch()}; +@@ -5230,9 +5245,6 @@ constexpr year_month_day operator+(const year_month_day& ymd, const months&a-Requires:
-ymd.month().ok()
istrue
. -Returns:
(ymd.year() / ymd.month() + dm) / ymd.day()
.@@ -5543,11 +5555,7 @@ constexpr year_month_day_last::operator sys_days() const noexcept;
@@ -5557,15 +5565,7 @@ constexpr explicit year_month_day_last::operator local_days() const noexcept;-Requires:
-ok() == true
. --Returns: A
sys_days
which represents the date represented by -*this
. +Effects: Equivalent to:return sys_days{year()/month()/day()};
@@ -5647,17 +5647,7 @@ constexpr year_month_day_last operator+(const year_month_day_last& ymdl, con-Requires:
-ok() == true
. --Returns: A
-local_days
which represents the date represented by -*this
. --Remarks: Shall return a value equivalent to -
local_days{static_cast<sys_days>(*this).time_since_epoch()}
. +Effects: Equivalent to:return local_days{sys_days{*this}.time_since_epoch()};
@@ -5951,11 +5941,14 @@ constexpr year_month_weekday::operator sys_days() const noexcept;-Requires:
-ymdl.ok()
istrue
. --Returns:
-(ymdl.year() / ymdl.month() + dm) / last
. --Postconditions: The resultant
-year_month_day_last
will return -true
fromok()
. --Complexity: O(1) with respect to the value of
dm
. +Effects: Equivalent to:return (ymdl.year() / ymdl.month() + dm) / last
.@@ -5965,15 +5958,7 @@ constexpr explicit year_month_weekday::operator local_days() const noexcept;-Requires:
-ok() == true
. --Returns: A
sys_days
which represents the date represented by -*this
. +Returns: Ify_.ok() && m_.ok() && wdi_.weekday().ok()
, +returns asys_days
which represents the date +(index() - 1)*7
days after the first +weekday()
ofyear()/month()
. Ifindex()
is +0
the returnedsys_days
represents the date 7 days prior +to the firstweekday()
ofyear()/month()
. +Otherwise,!y_.ok() || !m_.ok() || !wdi_.weekday().ok()
and the returned +value is unspecified.@@ -6015,18 +6000,8 @@ constexpr year_month_weekday operator+(const year_month_weekday& ymwd, const-Requires:
-ok() == true
. --Returns: A
-local_days
which represents the date represented by -*this
. --Remarks: Shall return a value equivalent to -
local_days{static_cast<sys_days>(*this).time_since_epoch()}
. +Effects: Equivalent to:return local_days{sys_days{*this}.time_since_epoch()};
-Requires:
-ymwd.ok()
istrue
. -Returns:
-(ymwd.year() / ymwd.month() + dm) / ymwd.weekday_indexed()
.-Postconditions: The resultant
-year_month_weekday
will return -true
fromok()
. --Complexity: O(1) with respect to the value of
dm
. -@@ -6298,11 +6273,9 @@ constexpr year_month_weekday_last::operator sys_days() const noexcept;@@ -6312,15 +6285,7 @@ constexpr explicit year_month_weekday_last::operator local_days() const noexcept-Requires:
-ok() == true
. --Returns: A
sys_days
which represents the date represented by -*this
. +Returns: Ifok() == true
, returns asys_days
which +represents the lastweekday()
ofyear()/month()
. Otherwise +the returned value is unspecified.@@ -6360,17 +6325,7 @@ constexpr year_month_weekday_last operator+(const year_month_weekday_last& y-Requires:
-ok() == true
. --Returns: A
-local_days
which represents the date represented by -*this
. --Remarks: Shall return a value equivalent to -
local_days{static_cast<sys_days>(*this).time_since_epoch()}
. +Effects: Equivalent to:return local_days{sys_days{*this}.time_since_epoch()};
-Requires:
-ymwdl.ok()
istrue
. --Returns:
-(ymwdl.year() / ymwdl.month() + dm) / ymwdl.weekday_last()
. --Postconditions: The resultant
-year_month_weekday_last
will return -true
fromok()
. --Complexity: O(1) with respect to the value of
dm
. +Effects: Equivalent to:return (ymwdl.year() / ymwdl.month() + dm) / ymwdl.weekday_last()
.