aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.com>2022-12-30 00:27:44 +0300
committerthegeorg <thegeorg@yandex-team.com>2022-12-30 00:27:44 +0300
commit412f8ce5d0f86a2c5cca4e877718a2e0f4c624e0 (patch)
treead8162484b201cb10658c9cf952f7dc9a2ab04c6 /contrib
parent1a05915a640ad390c50c0fb5f77e547cdb6d8b37 (diff)
downloadydb-412f8ce5d0f86a2c5cca4e877718a2e0f4c624e0.tar.gz
Update contrib/restricted/boost/date_time to 1.81.0
Diffstat (limited to 'contrib')
-rw-r--r--contrib/restricted/boost/date_time/include/boost/date_time/date.hpp2
-rw-r--r--contrib/restricted/boost/date_time/include/boost/date_time/gregorian/greg_date.hpp25
-rw-r--r--contrib/restricted/boost/date_time/include/boost/date_time/gregorian_calendar.ipp4
3 files changed, 15 insertions, 16 deletions
diff --git a/contrib/restricted/boost/date_time/include/boost/date_time/date.hpp b/contrib/restricted/boost/date_time/include/boost/date_time/date.hpp
index ef98cb289a..72be68db19 100644
--- a/contrib/restricted/boost/date_time/include/boost/date_time/date.hpp
+++ b/contrib/restricted/boost/date_time/include/boost/date_time/date.hpp
@@ -21,7 +21,7 @@ namespace date_time {
/*!
The date template represents an interface shell for a date class
that is based on a year-month-day system such as the gregorian
- or iso systems. It provides basic operations to enable calculation
+ or ISO 8601 systems. It provides basic operations to enable calculation
and comparisons.
<b>Theory</b>
diff --git a/contrib/restricted/boost/date_time/include/boost/date_time/gregorian/greg_date.hpp b/contrib/restricted/boost/date_time/include/boost/date_time/gregorian/greg_date.hpp
index c7bcc964c5..e9b80c76b0 100644
--- a/contrib/restricted/boost/date_time/include/boost/date_time/gregorian/greg_date.hpp
+++ b/contrib/restricted/boost/date_time/include/boost/date_time/gregorian/greg_date.hpp
@@ -74,18 +74,8 @@ namespace gregorian {
{}
//! Constructor for infinities, not a date, max and min date
BOOST_CXX14_CONSTEXPR explicit date(special_values sv):
- date_time::date<date, gregorian_calendar, date_duration>(date_rep_type::from_special(sv))
- {
- if (sv == min_date_time)
- {
- *this = date(1400, 1, 1);
- }
- if (sv == max_date_time)
- {
- *this = date(9999, 12, 31);
- }
-
- }
+ date_time::date<date, gregorian_calendar, date_duration>(from_special_adjusted(sv))
+ {}
//!Return the Julian Day number for the date.
BOOST_CXX14_CONSTEXPR date_int_type julian_day() const
{
@@ -105,7 +95,7 @@ namespace gregorian {
ymd_type ymd = year_month_day();
return gregorian_calendar::modjulian_day_number(ymd);
}
- //!Return the iso 8601 week number 1..53
+ //!Return the ISO 8601 week number 1..53
BOOST_CXX14_CONSTEXPR int week_number() const
{
ymd_type ymd = year_month_day();
@@ -129,6 +119,15 @@ namespace gregorian {
private:
+ BOOST_CXX14_CONSTEXPR date_rep_type from_special_adjusted(special_values sv)
+ {
+ switch (sv)
+ {
+ case min_date_time: return gregorian_calendar::day_number(ymd_type(1400, 1, 1));
+ case max_date_time: return gregorian_calendar::day_number(ymd_type(9999, 12, 31));
+ default: return date_rep_type::from_special(sv);
+ }
+ }
};
inline BOOST_CXX14_CONSTEXPR
diff --git a/contrib/restricted/boost/date_time/include/boost/date_time/gregorian_calendar.ipp b/contrib/restricted/boost/date_time/include/boost/date_time/gregorian_calendar.ipp
index 5a7e49b378..20d4e700d5 100644
--- a/contrib/restricted/boost/date_time/include/boost/date_time/gregorian_calendar.ipp
+++ b/contrib/restricted/boost/date_time/include/boost/date_time/gregorian_calendar.ipp
@@ -25,8 +25,8 @@ namespace date_time {
return d;
}
- //!Return the iso week number for the date
- /*!Implements the rules associated with the iso 8601 week number.
+ //!Return the ISO 8601 week number for the date
+ /*!Implements the rules associated with the ISO 8601 week number.
Basically the rule is that Week 1 of the year is the week that contains
January 4th or the week that contains the first Thursday in January.
Reference for this algorithm is the Calendar FAQ by Claus Tondering, April 2000.