/external/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ |
D | ok.pass.cpp | 25 using year = std::chrono::year; in main() typedef 35 static_assert(!year_month_day{year{-32768}, month{}, day{}}.ok(), ""); // All three bad in main() 37 static_assert(!year_month_day{year{-32768}, January, day{1}}.ok(), ""); // Bad year in main() 38 static_assert(!year_month_day{year{2019}, month{}, day{1}}.ok(), ""); // Bad month in main() 39 static_assert(!year_month_day{year{2019}, January, day{} }.ok(), ""); // Bad day in main() 41 static_assert(!year_month_day{year{-32768}, month{}, day{1}}.ok(), ""); // Bad year & month in main() 42 static_assert(!year_month_day{year{2019}, month{}, day{} }.ok(), ""); // Bad month & day in main() 43 static_assert(!year_month_day{year{-32768}, January, day{} }.ok(), ""); // Bad year & day in main() 45 static_assert( year_month_day{year{2019}, January, day{1}}.ok(), ""); // All OK in main() 48 static_assert( year_month_day{year{2020}, month{ 1}, day{31}}.ok(), ""); in main() [all …]
|
/external/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/ |
D | comparisons.pass.cpp | 15 // Returns: x.year() == y.year() && x.month() == y.month(). 19 // If x.year() < y.year() returns true. 20 // Otherwise, if x.year() > y.year() returns false. 36 using year = std::chrono::year; in main() typedef 47 year_month_day{year{1234}, January, day{1}}, in main() 48 year_month_day{year{1234}, January, day{1}}, in main() 53 year_month_day{year{1234}, January, day{1}}, in main() 54 year_month_day{year{1234}, January, day{2}}, in main() 59 year_month_day{year{1234}, January, day{1}}, in main() 60 year_month_day{year{1234}, February, day{1}}, in main() [all …]
|
/external/protobuf/src/google/protobuf/stubs/ |
D | time.cc | 27 // Count the seconds from the given year (start at Jan 1, 00:00) to 100 years 29 int64 SecondsPer100Years(int year) { in SecondsPer100Years() argument 30 if (year % 400 == 0 || year % 400 > 300) { in SecondsPer100Years() 37 // Count the seconds from the given year (start at Jan 1, 00:00) to 4 years 39 int64 SecondsPer4Years(int year) { in SecondsPer4Years() argument 40 if ((year % 100 == 0 || year % 100 > 96) && in SecondsPer4Years() 41 !(year % 400 == 0 || year % 400 > 396)) { in SecondsPer4Years() 50 bool IsLeapYear(int year) { in IsLeapYear() argument 51 return year % 400 == 0 || (year % 4 == 0 && year % 100 != 0); in IsLeapYear() 54 int64 SecondsPerYear(int year) { in SecondsPerYear() argument [all …]
|
/external/libcxx/test/std/utilities/time/time.cal/time.cal.operators/ |
D | year_month_day_last.pass.cpp | 15 // Returns: {ym.year(), month_day_last{ym.month()}}. 19 // operator/(const year& y, const month_day_last& mdl) noexcept; 24 // Returns: year(y) / mdl. 27 // operator/(const month_day_last& mdl, const year& y) noexcept; 32 // Returns: year(y) / mdl. 46 using year = std::chrono::year; in main() typedef 54 constexpr year_month Feb2018{year{2018}, February}; in main() 59 static_assert((Feb2018/last).year() == year{2018}, ""); in main() 65 year y{i}; in main() 68 assert(ymdl.year() == y); in main() [all …]
|
D | year_month_weekday_last.pass.cpp | 16 // Returns: {ym.year(), ym.month(), wdl}. 19 // operator/(const year& y, const month_weekday_last& mwdl) noexcept; 24 // Returns: year(y) / mwdl. 27 // operator/(const month_weekday_last& mwdl, const year& y) noexcept; 32 // Returns: year(y) / mwdl. 46 using year = std::chrono::year; in main() typedef 57 constexpr year_month Feb2018{year{2018}, February}; in main() 62 static_assert((Feb2018/weekday_last{Tuesday}).year() == year{2018}, ""); in main() 70 year y{i}; in main() 74 assert(ymwdl.year() == y); in main() [all …]
|
D | year_month.pass.cpp | 14 // constexpr year_month operator/(const year& y, const month& m) noexcept; 17 // constexpr year_month operator/(const year& y, int m) noexcept; 32 using year = std::chrono::year; in main() typedef 37 { // operator/(const year& y, const month& m) in main() 38 ASSERT_NOEXCEPT ( year{2018}/February); in main() 39 ASSERT_SAME_TYPE(year_month, decltype(year{2018}/February)); in main() 41 static_assert((year{2018}/February).year() == year{2018}, ""); in main() 42 static_assert((year{2018}/February).month() == month{2}, ""); in main() 46 year_month ym = year{i}/month{j}; in main() 47 assert(static_cast<int>(ym.year()) == i); in main() [all …]
|
D | year_month_weekday.pass.cpp | 16 // Returns: {ym.year(), ym.month(), wdi}. 19 // operator/(const year& y, const month_weekday& mwd) noexcept; 24 // Returns: year(y) / mwd. 27 // operator/(const month_weekday& mwd, const year& y) noexcept; 32 // Returns: year(y) / mwd. 43 using year = std::chrono::year; in main() typedef 57 constexpr year_month Feb2018{year{2018}, February}; in main() 62 static_assert((Feb2018/weekday_indexed{Tuesday, 2}).year() == year{2018}, "" ); in main() 71 year y(i); in main() 75 assert(ymd.year() == y); in main() [all …]
|
/external/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/ |
D | ok.pass.cpp | 12 // class year; 17 // static constexpr year min() noexcept; 18 // Returns year{ 32767}; 19 // static constexpr year max() noexcept; 20 // Returns year{-32767}; 30 using year = std::chrono::year; in main() typedef 32 ASSERT_NOEXCEPT( std::declval<const year>().ok()); in main() 33 ASSERT_SAME_TYPE(bool, decltype(std::declval<const year>().ok())); in main() 35 ASSERT_NOEXCEPT( year::max()); in main() 36 ASSERT_SAME_TYPE(year, decltype(year::max())); in main() [all …]
|
D | is_leap.pass.cpp | 12 // class year; 26 using year = std::chrono::year; in main() typedef 28 ASSERT_NOEXCEPT( year(1).is_leap()); in main() 29 ASSERT_SAME_TYPE(bool, decltype(year(1).is_leap())); in main() 31 static_assert(!year{1}.is_leap(), ""); in main() 32 static_assert(!year{2}.is_leap(), ""); in main() 33 static_assert(!year{3}.is_leap(), ""); in main() 34 static_assert( year{4}.is_leap(), ""); in main() 36 assert( year{-2000}.is_leap()); in main() 37 assert( year{ -400}.is_leap()); in main() [all …]
|
/external/python/cpython2/Demo/classes/ |
D | Dates.py | 3 # Date(month,day,year) returns a Date object. An instance prints as, 22 # .year int or long int 30 # hand, at least this package knows that 2000 is a leap year but 2100 62 def _is_leap(year): # 1 if leap year, else 0 argument 63 if year % 4 != 0: return 0 64 if year % 400 == 0: return 1 65 return year % 100 != 0 67 def _days_in_year(year): # number of days in year argument 68 return 365 + _is_leap(year) 70 def _days_before_year(year): # number of days before year argument [all …]
|
/external/libcxx/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/ |
D | comparisons.pass.cpp | 15 // Returns: x.year() == y.year() && x.month() == y.month() && x.weekday_indexed() == y.weekday_in… 28 using year = std::chrono::year; in main() typedef 42 year_month_weekday{year{1234}, January, weekday_indexed{Tuesday, 1}}, in main() 43 year_month_weekday{year{1234}, January, weekday_indexed{Tuesday, 1}}, in main() 48 year_month_weekday{year{1234}, January, weekday_indexed{Tuesday, 1}}, in main() 49 year_month_weekday{year{1234}, January, weekday_indexed{Tuesday, 2}}, in main() 54 year_month_weekday{year{1234}, January, weekday_indexed{Tuesday, 1}}, in main() 55 year_month_weekday{year{1234}, February, weekday_indexed{Tuesday, 1}}, in main() 58 // different year in main() 60 year_month_weekday{year{1234}, January, weekday_indexed{Tuesday, 1}}, in main() [all …]
|
/external/libcxx/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/ |
D | comparisons.pass.cpp | 15 // Returns: x.year() == y.year() && x.month() == y.month() && x.weekday_last() == y.weekday_last() 28 using year = std::chrono::year; in main() typedef 43 year_month_weekday_last{year{1234}, January, weekday_last{Tuesday}}, in main() 44 year_month_weekday_last{year{1234}, January, weekday_last{Tuesday}}, in main() 49 year_month_weekday_last{year{1234}, January, weekday_last{Tuesday}}, in main() 50 year_month_weekday_last{year{1234}, January, weekday_last{Wednesday}}, in main() 55 year_month_weekday_last{year{1234}, January, weekday_last{Tuesday}}, in main() 56 year_month_weekday_last{year{1234}, February, weekday_last{Tuesday}}, in main() 59 // different year in main() 61 year_month_weekday_last{year{1234}, January, weekday_last{Tuesday}}, in main() [all …]
|
/external/python/cpython3/Doc/library/ |
D | calendar.rst | 27 interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is 50 .. method:: itermonthdates(year, month) 52 Return an iterator for the month *month* (1--12) in the year *year*. This 58 .. method:: itermonthdays(year, month) 60 Return an iterator for the month *month* in the year *year* similar to 66 .. method:: itermonthdays2(year, month) 68 Return an iterator for the month *month* in the year *year* similar to 74 .. method:: itermonthdays3(year, month) 76 Return an iterator for the month *month* in the year *year* similar to 78 range. Days returned will be tuples consisting of a year, a month and a day [all …]
|
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/util/ |
D | IndianCalendar.java | 47 * So When its a leap year in Gregorian calendar then Chaitra has 31 days. 50 * Years are counted in the Saka Era, which starts its year 0 in 78AD (by gregorian calendar). 74 * Constant for Chaitra, the 1st month of the Indian year. 80 * Constant for Vaisakha, the 2nd month of the Indian year. 86 * Constant for Jyaistha, the 3rd month of the Indian year. 92 * Constant for Asadha, the 4th month of the Indian year. 98 * Constant for Sravana, the 5th month of the Indian year. 104 * Constant for Bhadra, the 6th month of the Indian year. 110 * Constant for Asvina, the 7th month of the Indian year. 116 * Constant for Kartika, the 8th month of the Indian year. [all …]
|
D | CopticCalendar.java | 32 * the 1st month of the Coptic year. 39 * the 2nd month of the Coptic year. 46 * the 3rd month of the Coptic year. 53 * the 4th month of the Coptic year. 60 * the 5th month of the Coptic year. 67 * the 6th month of the Coptic year. 74 * the 7th month of the Coptic year. 81 * the 8th month of the Coptic year. 88 * the 9th month of the Coptic year. 95 * the 10th month of the Coptic year. [all …]
|
D | HebrewCalendar.java | 25 * solar year (approximately 365.24 days) is not an even multiple of 28 * interesting, the start of a year can be delayed by up to three days 30 * to prevent certain illegal year lengths. Finally, the lengths of certain 31 * months can vary depending on the number of days in the year. 35 * not come at the end of the year, calculations involving 86 * Constant for Tishri, the 1st month of the Hebrew year. 92 * Constant for Heshvan, the 2nd month of the Hebrew year. 98 * Constant for Kislev, the 3rd month of the Hebrew year. 104 * Constant for Tevet, the 4th month of the Hebrew year. 110 * Constant for Shevat, the 5th month of the Hebrew year. [all …]
|
/external/icu/android_icu4j/src/main/java/android/icu/util/ |
D | IndianCalendar.java | 48 * So When its a leap year in Gregorian calendar then Chaitra has 31 days. 51 * Years are counted in the Saka Era, which starts its year 0 in 78AD (by gregorian calendar). 73 * Constant for Chaitra, the 1st month of the Indian year. 78 * Constant for Vaisakha, the 2nd month of the Indian year. 83 * Constant for Jyaistha, the 3rd month of the Indian year. 88 * Constant for Asadha, the 4th month of the Indian year. 93 * Constant for Sravana, the 5th month of the Indian year. 98 * Constant for Bhadra, the 6th month of the Indian year. 103 * Constant for Asvina, the 7th month of the Indian year. 108 * Constant for Kartika, the 8th month of the Indian year. [all …]
|
D | CopticCalendar.java | 32 * the 1st month of the Coptic year. 38 * the 2nd month of the Coptic year. 44 * the 3rd month of the Coptic year. 50 * the 4th month of the Coptic year. 56 * the 5th month of the Coptic year. 62 * the 6th month of the Coptic year. 68 * the 7th month of the Coptic year. 74 * the 8th month of the Coptic year. 80 * the 9th month of the Coptic year. 86 * the 10th month of the Coptic year. [all …]
|
D | HebrewCalendar.java | 26 * solar year (approximately 365.24 days) is not an even multiple of 29 * interesting, the start of a year can be delayed by up to three days 31 * to prevent certain illegal year lengths. Finally, the lengths of certain 32 * months can vary depending on the number of days in the year. 36 * not come at the end of the year, calculations involving 86 * Constant for Tishri, the 1st month of the Hebrew year. 91 * Constant for Heshvan, the 2nd month of the Hebrew year. 96 * Constant for Kislev, the 3rd month of the Hebrew year. 101 * Constant for Tevet, the 4th month of the Hebrew year. 106 * Constant for Shevat, the 5th month of the Hebrew year. [all …]
|
/external/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/ |
D | comparisons.pass.cpp | 12 // class year; 14 // constexpr bool operator==(const year& x, const year& y) noexcept; 15 // constexpr bool operator!=(const year& x, const year& y) noexcept; 16 // constexpr bool operator< (const year& x, const year& y) noexcept; 17 // constexpr bool operator> (const year& x, const year& y) noexcept; 18 // constexpr bool operator<=(const year& x, const year& y) noexcept; 19 // constexpr bool operator>=(const year& x, const year& y) noexcept; 32 using year = std::chrono::year; in main() typedef 34 AssertComparisons6AreNoexcept<year>(); in main() 35 AssertComparisons6ReturnBool<year>(); in main() [all …]
|
/external/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/ |
D | comparisons.pass.cpp | 15 // Returns: x.year() == y.year() && x.month_day_last() == y.month_day_last(). 19 // If x.year() < y.year(), returns true. 20 // Otherwise, if x.year() > y.year(), returns false. 32 using year = std::chrono::year; in main() typedef 44 year_month_day_last{year{1234}, month_day_last{January}}, in main() 45 year_month_day_last{year{1234}, month_day_last{January}}, in main() 50 year_month_day_last{year{1234}, month_day_last{January}}, in main() 51 year_month_day_last{year{1234}, month_day_last{February}}, in main() 54 // different year in main() 56 year_month_day_last{year{1234}, month_day_last{January}}, in main() [all …]
|
/external/icu/icu4c/source/test/testdata/ |
D | format.txt | 29 …// or a calendar spec ERA=0,YEAR=1, etc.. applied to the calendar type specified by the loc… 39 "ERA=1,YEAR=2007,MONTH=AUGUST,DATE=8,HOUR_OF_DAY=18,MINUTE=54,SECOND=0", 46 "ERA=1,YEAR=98,MONTH=0,DATE=24", 54 "ERA=0,YEAR=2,MONTH=0,DATE=24", 96 "ERA=1,YEAR=2012,MONTH=OCTOBER,DATE=8,HOUR_OF_DAY=23,MINUTE=59,SECOND=0", 104 "ERA=1,YEAR=2012,MONTH=OCTOBER,DATE=8,HOUR_OF_DAY=23,MINUTE=59,SECOND=0", 119 "ERA=1,YEAR=2012,MONTH=OCTOBER,DATE=8,HOUR_OF_DAY=23,MINUTE=59,SECOND=0", 127 "ERA=1,YEAR=2012,MONTH=OCTOBER,DATE=8,HOUR_OF_DAY=23,MINUTE=59,SECOND=0", 151 "ERA=1,YEAR=2012,MONTH=OCTOBER,DATE=8,HOUR_OF_DAY=23,MINUTE=59,SECOND=0", 159 "ERA=1,YEAR=2012,MONTH=OCTOBER,DATE=8,HOUR_OF_DAY=23,MINUTE=59,SECOND=0", [all …]
|
/external/icu/icu4c/source/i18n/ |
D | gregoimp.h | 106 #define kJan1_1JulianDay 1721426 // January 1, year 1 (Gregorian) 151 * Return TRUE if the given year is a leap year. 152 * @param year Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc. 153 * @return TRUE if the year is a leap year 155 static inline UBool isLeapYear(int32_t year); 159 * @param year Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc. 163 static inline int8_t monthLength(int32_t year, int32_t month); 167 * @param y the extended year 174 * Convert a year, month, and day-of-month, given in the proleptic 176 * @param year Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc. [all …]
|
/external/python/cpython2/Doc/library/ |
D | calendar.rst | 49 .. method:: itermonthdates(year, month) 51 Return an iterator for the month *month* (1--12) in the year *year*. This 57 .. method:: itermonthdays2(year, month) 59 Return an iterator for the month *month* in the year *year* similar to 64 .. method:: itermonthdays(year, month) 66 Return an iterator for the month *month* in the year *year* similar to 70 .. method:: monthdatescalendar(year, month) 72 Return a list of the weeks in the month *month* of the *year* as full 76 .. method:: monthdays2calendar(year, month) 78 Return a list of the weeks in the month *month* of the *year* as full [all …]
|
/external/python/cpython3/Lib/ |
D | calendar.py | 100 def isleap(year): argument 102 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) 113 def weekday(year, month, day): argument 114 """Return weekday (0-6 ~ Mon-Sun) for year, month (1-12), day (1-31).""" 115 if not datetime.MINYEAR <= year <= datetime.MAXYEAR: 116 year = 2000 + year % 400 117 return datetime.date(year, month, day).weekday() 120 def monthrange(year, month): argument 122 year, month.""" 125 day1 = weekday(year, month, 1) [all …]
|