forked from HowardHinnant/date
Rewrite format and parse in terms of detail::fields<Duration>
* Add format and parse to utc_time<Duration>. * Added more tests.
This commit is contained in:
@@ -6326,6 +6326,7 @@ time_of_day<std::chrono::hours>
|
||||
public:
|
||||
using precision = std::chrono::hours;
|
||||
|
||||
constexpr time_of_day() noexcept;
|
||||
constexpr explicit time_of_day(std::chrono::hours since_midnight) noexcept;
|
||||
|
||||
constexpr std::chrono::hours hours() const noexcept;
|
||||
@@ -6339,6 +6340,21 @@ public:
|
||||
};
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
constexpr time_of_day<std::chrono::hours>::time_of_day() noexcept;
|
||||
</pre>
|
||||
|
||||
<blockquote>
|
||||
<p>
|
||||
<i>Effects:</i> Constructs an object of type <code>time_of_day</code> in 24-hour format
|
||||
corresponding to 00:00:00 hours after 00:00:00.
|
||||
</p>
|
||||
<p>
|
||||
<i>Postconditions:</i> <code>hours()</code> returns <code>0h</code>.
|
||||
<code>mode()</code> returns <code>0</code>.
|
||||
</p>
|
||||
</blockquote>
|
||||
|
||||
<pre>
|
||||
constexpr explicit time_of_day<std::chrono::hours>::time_of_day(std::chrono::hours since_midnight) noexcept;
|
||||
</pre>
|
||||
@@ -6453,6 +6469,7 @@ time_of_day<std::chrono::minutes>
|
||||
public:
|
||||
using precision = std::chrono::minutes;
|
||||
|
||||
constexpr time_of_day() noexcept;
|
||||
constexpr explicit time_of_day(std::chrono::minutes since_midnight) noexcept;
|
||||
|
||||
constexpr std::chrono::hours hours() const noexcept;
|
||||
@@ -6467,6 +6484,21 @@ public:
|
||||
};
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
constexpr time_of_day<std::chrono::minutes>::time_of_day() noexcept;
|
||||
</pre>
|
||||
|
||||
<blockquote>
|
||||
<p>
|
||||
<i>Effects:</i> Constructs an object of type <code>time_of_day</code> in 24-hour format
|
||||
corresponding to 0 minutes after 00:00:00.
|
||||
</p>
|
||||
<p>
|
||||
<i>Postconditions:</i> <code>hours()</code> returns <code>0h</code>.
|
||||
<code>minutes()</code> returns <code>0min</code>. <code>mode()</code> returns <code>0</code>.
|
||||
</p>
|
||||
</blockquote>
|
||||
|
||||
<pre>
|
||||
constexpr explicit time_of_day<std::chrono::minutes>::time_of_day(std::chrono::minutes since_midnight) noexcept;
|
||||
</pre>
|
||||
@@ -6593,6 +6625,7 @@ time_of_day<std::chrono::seconds>
|
||||
public:
|
||||
using precision = std::chrono::seconds;
|
||||
|
||||
constexpr time_of_day() noexcept;
|
||||
constexpr explicit time_of_day(std::chrono::seconds since_midnight) noexcept;
|
||||
|
||||
constexpr std::chrono::hours hours() const noexcept;
|
||||
@@ -6608,6 +6641,22 @@ public:
|
||||
};
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
constexpr time_of_day<std::chrono::seconds>::time_of_day() noexcept;
|
||||
</pre>
|
||||
|
||||
<blockquote>
|
||||
<p>
|
||||
<i>Effects:</i> Constructs an object of type <code>time_of_day</code> in 24-hour format
|
||||
corresponding to 0 seconds after 00:00:00.
|
||||
</p>
|
||||
<p>
|
||||
<i>Postconditions:</i> <code>hours()</code> returns <code>0h</code>.
|
||||
<code>minutes()</code> returns <code>0min</code>. <code>seconds()</code> returns
|
||||
<code>0s</code>. <code>mode()</code> returns <code>0</code>.
|
||||
</p>
|
||||
</blockquote>
|
||||
|
||||
<pre>
|
||||
constexpr explicit time_of_day<std::chrono::seconds>::time_of_day(std::chrono::seconds since_midnight) noexcept;
|
||||
</pre>
|
||||
@@ -6746,6 +6795,7 @@ time_of_day<std::chrono::duration<Rep, Period>>
|
||||
public:
|
||||
using precision = <i>The decimal-based duration used to format</i>
|
||||
|
||||
constexpr time_of_day() noexcept;
|
||||
constexpr explicit time_of_day(std::chrono::duration<Rep, Period> since_midnight) noexcept;
|
||||
|
||||
constexpr std::chrono::hours hours() const noexcept;
|
||||
@@ -6766,6 +6816,25 @@ public:
|
||||
This specialization shall not exist unless <code>Period < 1s</code>.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
constexpr
|
||||
time_of_day<std::chrono::duration<Rep, Period>>::time_of_day() noexcept;
|
||||
</pre>
|
||||
|
||||
<blockquote>
|
||||
<p>
|
||||
<i>Effects:</i> Constructs an object of type <code>time_of_day</code> in 24-hour format
|
||||
corresponding to 0 fractional seconds after 00:00:00.
|
||||
</p>
|
||||
<p>
|
||||
<i>Postconditions:</i> <code>hours()</code> returns <code>0h</code>.
|
||||
<code>minutes()</code> returns <code>0min</code>.
|
||||
<code>seconds()</code> returns <code>0s</code>.
|
||||
<code>subseconds()</code> returns 0 fractional precision seconds.
|
||||
<code>mode()</code> returns <code>0</code>.
|
||||
</p>
|
||||
</blockquote>
|
||||
|
||||
<pre>
|
||||
constexpr explicit
|
||||
time_of_day<std::chrono::duration<Rep, Period>>::time_of_day(std::chrono::duration<Rep, Period> since_midnight) noexcept;
|
||||
|
||||
Reference in New Issue
Block a user