forked from HowardHinnant/date
Update to Sunday constants
This commit is contained in:
@@ -2096,7 +2096,7 @@ tai_clock::to_local(const tai_time<Duration>& t) NOEXCEPT
|
||||
{
|
||||
using duration = typename std::common_type<Duration, date::days>::type;
|
||||
return local_time<duration>{t.time_since_epoch()} -
|
||||
(local_days(year{1970}/jan/1) - local_days(year{1958}/jan/1));
|
||||
(local_days(year{1970}/January/1) - local_days(year{1958}/January/1));
|
||||
}
|
||||
|
||||
template <class Duration>
|
||||
@@ -2106,7 +2106,7 @@ tai_clock::from_local(const local_time<Duration>& t) NOEXCEPT
|
||||
{
|
||||
using duration = typename std::common_type<Duration, date::days>::type;
|
||||
return tai_time<duration>{t.time_since_epoch()} +
|
||||
(local_days(year{1970}/jan/1) - local_days(year{1958}/jan/1));
|
||||
(local_days(year{1970}/January/1) - local_days(year{1958}/January/1));
|
||||
}
|
||||
|
||||
template <class CharT, class Traits, class Duration>
|
||||
@@ -2219,7 +2219,7 @@ gps_clock::to_local(const gps_time<Duration>& t) NOEXCEPT
|
||||
{
|
||||
using duration = typename std::common_type<Duration, date::days>::type;
|
||||
return local_time<duration>{t.time_since_epoch()} +
|
||||
(local_days(year{1980}/jan/sun[1]) - local_days(year{1970}/jan/1));
|
||||
(local_days(year{1980}/January/Sunday[1]) - local_days(year{1970}/January/1));
|
||||
}
|
||||
|
||||
template <class Duration>
|
||||
@@ -2229,7 +2229,7 @@ gps_clock::from_local(const local_time<Duration>& t) NOEXCEPT
|
||||
{
|
||||
using duration = typename std::common_type<Duration, date::days>::type;
|
||||
return gps_time<duration>{t.time_since_epoch()} -
|
||||
(local_days(year{1980}/jan/sun[1]) - local_days(year{1970}/jan/1));
|
||||
(local_days(year{1980}/January/Sunday[1]) - local_days(year{1970}/January/1));
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user