mirror of
https://github.com/HowardHinnant/date.git
synced 2024-12-28 01:04:54 +08:00
Improve spec for year_month - year_month
This commit is contained in:
parent
2b55bdb2e4
commit
2b100280c0
@ -60,7 +60,7 @@ Document number: D0355R4<br>
|
||||
|
||||
<ul>
|
||||
<li>Rewrite in terms of <code>string_view</code>.</li>
|
||||
<li><ins>Improve spec for operator-(const year_month& x, const year_month& y).</ins></li>
|
||||
<li>Improve spec for operator-(const year_month& x, const year_month& y).</li>
|
||||
<li>Refine constraints on conversions from calendar types to sys_days.</li>
|
||||
<li>Added <code>zoned_time</code> default constructor.</li>
|
||||
<li>Correct minor type-o's.</li>
|
||||
@ -6419,8 +6419,8 @@ constexpr months operator-(const year_month& x, const year_month& y) noe
|
||||
|
||||
<blockquote>
|
||||
<p>
|
||||
<i>Returns:</i> The number of <code>months</code> one must add to <code>y</code> to get
|
||||
<code>x</code>.
|
||||
<i>Returns:</i> <code>x.year() - y.year() + months{static_cast<int>(unsigned{x.month()}) -
|
||||
static_cast<int>(unsigned{y.month()})}</code>.
|
||||
</p>
|
||||
</blockquote>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user