/external/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/ |
D | literals.pass.cpp | 36 ASSERT_SAME_TYPE(const std::chrono::month, decltype(std::chrono::January)); in main() 37 ASSERT_SAME_TYPE(const std::chrono::month, decltype(std::chrono::February)); in main() 38 ASSERT_SAME_TYPE(const std::chrono::month, decltype(std::chrono::March)); in main() 39 ASSERT_SAME_TYPE(const std::chrono::month, decltype(std::chrono::April)); in main() 40 ASSERT_SAME_TYPE(const std::chrono::month, decltype(std::chrono::May)); in main() 41 ASSERT_SAME_TYPE(const std::chrono::month, decltype(std::chrono::June)); in main() 42 ASSERT_SAME_TYPE(const std::chrono::month, decltype(std::chrono::July)); in main() 43 ASSERT_SAME_TYPE(const std::chrono::month, decltype(std::chrono::August)); in main() 44 ASSERT_SAME_TYPE(const std::chrono::month, decltype(std::chrono::September)); in main() 45 ASSERT_SAME_TYPE(const std::chrono::month, decltype(std::chrono::October)); in main() [all …]
|
/external/libcxx/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ |
D | ok.pass.cpp | 26 using month = std::chrono::month; in main() typedef 30 constexpr month January = std::chrono::January; in main() 35 static_assert(!year_month_day{year{-32768}, month{}, day{}}.ok(), ""); // All three bad in main() 38 static_assert(!year_month_day{year{2019}, month{}, day{1}}.ok(), ""); // Bad month 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() 48 static_assert( year_month_day{year{2020}, month{ 1}, day{31}}.ok(), ""); in main() 49 static_assert(!year_month_day{year{2020}, month{ 2}, day{31}}.ok(), ""); in main() 50 static_assert( year_month_day{year{2020}, month{ 3}, day{31}}.ok(), ""); in main() 51 static_assert(!year_month_day{year{2020}, month{ 4}, day{31}}.ok(), ""); in main() [all …]
|
D | plus_minus_equal_month.pass.cpp | 26 if (static_cast<unsigned>((d1 ).month()) != 1) return false; in testConstexpr() 27 if (static_cast<unsigned>((d1 += Ds{ 1}).month()) != 2) return false; in testConstexpr() 28 if (static_cast<unsigned>((d1 += Ds{ 2}).month()) != 4) return false; in testConstexpr() 29 if (static_cast<unsigned>((d1 += Ds{12}).month()) != 4) return false; in testConstexpr() 30 if (static_cast<unsigned>((d1 -= Ds{ 1}).month()) != 3) return false; in testConstexpr() 31 if (static_cast<unsigned>((d1 -= Ds{ 2}).month()) != 1) return false; in testConstexpr() 32 if (static_cast<unsigned>((d1 -= Ds{12}).month()) != 1) return false; in testConstexpr() 39 using month = std::chrono::month; in main() typedef 50 …static_assert(testConstexpr<year_month_day, months>(year_month_day{year{1234}, month{1}, day{1}}),… in main() 56 year_month_day ym(y, month{i}, d); in main() [all …]
|
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/util/ |
D | HebrewCalendar.java | 363 public HebrewCalendar(int year, int month, int date) { in HebrewCalendar() argument 366 this.set(MONTH, month); in HebrewCalendar() 402 public HebrewCalendar(int year, int month, int date, int hour, in HebrewCalendar() argument 407 this.set(MONTH, month); in HebrewCalendar() 458 int month = get(MONTH); in add() local 462 acrossAdar1 = (month < ADAR_1); // started before ADAR_1? in add() 463 month += amount; in add() 465 if (acrossAdar1 && month>=ADAR_1 && !isLeapYear(year)) { in add() 466 ++month; in add() 468 if (month <= ELUL) { in add() [all …]
|
D | IndianCalendar.java | 256 public IndianCalendar(int year, int month, int date) { in IndianCalendar() argument 259 this.set(Calendar.MONTH, month); in IndianCalendar() 283 public IndianCalendar(int year, int month, int date, int hour, in IndianCalendar() argument 288 this.set(Calendar.MONTH, month); in IndianCalendar() 337 protected int handleGetMonthLength(int extendedYear, int month) { in handleGetMonthLength() argument 338 if (month < 0 || month > 11) { in handleGetMonthLength() 340 extendedYear += floorDivide(month, 12, remainder); in handleGetMonthLength() 341 month = remainder[0]; in handleGetMonthLength() 344 if(isGregorianLeap(extendedYear + INDIAN_ERA_START) && month == 0) { in handleGetMonthLength() 348 if(month >= 1 && month <=5) { in handleGetMonthLength() [all …]
|
D | PersianCalendar.java | 223 public PersianCalendar(int year, int month, int date) in PersianCalendar() argument 227 this.set(Calendar.MONTH, month); in PersianCalendar() 251 public PersianCalendar(int year, int month, int date, int hour, in PersianCalendar() argument 256 this.set(Calendar.MONTH, month); in PersianCalendar() 332 protected int handleGetMonthLength(int extendedYear, int month) { in handleGetMonthLength() argument 335 if (month < 0 || month > 11) { in handleGetMonthLength() 337 extendedYear += floorDivide(month, 12, rem); in handleGetMonthLength() 338 month = rem[0]; in handleGetMonthLength() 341 return MONTH_COUNT[month][isLeapYear(extendedYear)?1:0]; in handleGetMonthLength() 366 protected int handleComputeMonthStart(int eyear, int month, boolean useMonth) { in handleComputeMonthStart() argument [all …]
|
D | IslamicCalendar.java | 285 public IslamicCalendar(int year, int month, int date) in IslamicCalendar() argument 289 this.set(Calendar.MONTH, month); in IslamicCalendar() 310 public IslamicCalendar(int year, int month, int date, int hour, in IslamicCalendar() argument 315 this.set(Calendar.MONTH, month); in IslamicCalendar() 612 private long monthStart(int year, int month) { in monthStart() argument 615 int realYear = year + month / 12; in monthStart() 616 int realMonth = month % 12; in monthStart() 627 for(int i=0; i< month; i++) { in monthStart() 643 private static final long trueMonthStart(long month) in trueMonthStart() argument 645 long start = cache.get(month); in trueMonthStart() [all …]
|
/external/icu/android_icu4j/src/main/java/android/icu/util/ |
D | HebrewCalendar.java | 343 public HebrewCalendar(int year, int month, int date) { in HebrewCalendar() argument 346 this.set(MONTH, month); in HebrewCalendar() 380 public HebrewCalendar(int year, int month, int date, int hour, in HebrewCalendar() argument 385 this.set(MONTH, month); in HebrewCalendar() 435 int month = get(MONTH); in add() local 439 acrossAdar1 = (month < ADAR_1); // started before ADAR_1? in add() 440 month += amount; in add() 442 if (acrossAdar1 && month>=ADAR_1 && !isLeapYear(year)) { in add() 443 ++month; in add() 445 if (month <= ELUL) { in add() [all …]
|
D | IndianCalendar.java | 234 public IndianCalendar(int year, int month, int date) { in IndianCalendar() argument 237 this.set(Calendar.MONTH, month); in IndianCalendar() 260 public IndianCalendar(int year, int month, int date, int hour, in IndianCalendar() argument 265 this.set(Calendar.MONTH, month); in IndianCalendar() 311 protected int handleGetMonthLength(int extendedYear, int month) { in handleGetMonthLength() argument 312 if (month < 0 || month > 11) { in handleGetMonthLength() 314 extendedYear += floorDivide(month, 12, remainder); in handleGetMonthLength() 315 month = remainder[0]; in handleGetMonthLength() 318 if(isGregorianLeap(extendedYear + INDIAN_ERA_START) && month == 0) { in handleGetMonthLength() 322 if(month >= 1 && month <=5) { in handleGetMonthLength() [all …]
|
D | PersianCalendar.java | 226 public PersianCalendar(int year, int month, int date) in PersianCalendar() argument 230 this.set(Calendar.MONTH, month); in PersianCalendar() 254 public PersianCalendar(int year, int month, int date, int hour, in PersianCalendar() argument 259 this.set(Calendar.MONTH, month); in PersianCalendar() 335 protected int handleGetMonthLength(int extendedYear, int month) { in handleGetMonthLength() argument 338 if (month < 0 || month > 11) { in handleGetMonthLength() 340 extendedYear += floorDivide(month, 12, rem); in handleGetMonthLength() 341 month = rem[0]; in handleGetMonthLength() 344 return MONTH_COUNT[month][isLeapYear(extendedYear)?1:0]; in handleGetMonthLength() 369 protected int handleComputeMonthStart(int eyear, int month, boolean useMonth) { in handleComputeMonthStart() argument [all …]
|
D | IslamicCalendar.java | 260 public IslamicCalendar(int year, int month, int date) in IslamicCalendar() argument 264 this.set(Calendar.MONTH, month); in IslamicCalendar() 284 public IslamicCalendar(int year, int month, int date, int hour, in IslamicCalendar() argument 289 this.set(Calendar.MONTH, month); in IslamicCalendar() 585 private long monthStart(int year, int month) { in monthStart() argument 588 int realYear = year + month / 12; in monthStart() 589 int realMonth = month % 12; in monthStart() 600 for(int i=0; i< month; i++) { in monthStart() 616 private static final long trueMonthStart(long month) in trueMonthStart() argument 618 long start = cache.get(month); in trueMonthStart() [all …]
|
/external/python/cpython2/Modules/_ctypes/libffi/ |
D | mdate-sh | 114 month= 116 until test $month 123 Jan) month=January; nummonth=1;; 124 Feb) month=February; nummonth=2;; 125 Mar) month=March; nummonth=3;; 126 Apr) month=April; nummonth=4;; 127 May) month=May; nummonth=5;; 128 Jun) month=June; nummonth=6;; 129 Jul) month=July; nummonth=7;; 130 Aug) month=August; nummonth=8;; [all …]
|
/external/icu/icu4c/source/i18n/ |
D | hebrwcal.cpp | 227 int32_t month = get(UCAL_MONTH, status); in add() local 231 acrossAdar1 = (month < ADAR_1); // started before ADAR_1? in add() 232 month += amount; in add() 234 if (acrossAdar1 && month>=ADAR_1 && !isLeapYear(year)) { in add() 235 ++month; in add() 237 if (month <= ELUL) { in add() 240 month -= ELUL+1; in add() 245 acrossAdar1 = (month > ADAR_1); // started after ADAR_1? in add() 246 month += amount; in add() 248 if (acrossAdar1 && month<=ADAR_1 && !isLeapYear(year)) { in add() [all …]
|
D | islamcal.cpp | 393 int32_t IslamicCalendar::monthStart(int32_t year, int32_t month) const { in monthStart() 396 return (int32_t)uprv_ceil(29.5*month) in monthStart() 399 return trueMonthStart(12*(year-1) + month); in monthStart() 402 for(int i=0; i< month; i++){ in monthStart() 417 int32_t IslamicCalendar::trueMonthStart(int32_t month) const in trueMonthStart() 420 int32_t start = CalendarCache::get(&gMonthCache, month, status); in trueMonthStart() 425 + uprv_floor(month * CalendarAstronomer::SYNODIC_MONTH) * kOneDay; in trueMonthStart() 454 CalendarCache::put(&gMonthCache, month, start, status); in trueMonthStart() 509 int32_t IslamicCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month) const { in handleGetMonthLength() 515 length = 29 + (month+1) % 2; in handleGetMonthLength() [all …]
|
D | indiancal.cpp | 112 int32_t IndianCalendar::handleGetMonthLength(int32_t eyear, int32_t month) const { in handleGetMonthLength() 113 if (month < 0 || month > 11) { in handleGetMonthLength() 114 eyear += ClockMath::floorDivide(month, 12, month); in handleGetMonthLength() 117 if (isGregorianLeap(eyear + INDIAN_ERA_START) && month == 0) { in handleGetMonthLength() 121 if (month >= 1 && month <= 5) { in handleGetMonthLength() 143 static double gregorianToJD(int32_t year, int32_t month, int32_t date) { in gregorianToJD() argument 149 uprv_floor((((367 * month) - 362) / 12) + in gregorianToJD() 150 ((month <= 2) ? 0 : in gregorianToJD() 164 int32_t year, month, day; in jdToGregorian() local 183 month = (int32_t)uprv_floor((((yearday + leapadj) * 12) + 373) / 367); in jdToGregorian() [all …]
|
D | persncal.cpp | 132 int32_t PersianCalendar::monthStart(int32_t year, int32_t month) const { in monthStart() 133 return handleComputeMonthStart(year,month,TRUE); in monthStart() 146 int32_t PersianCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month) const { in handleGetMonthLength() 149 if (month < 0 || month > 11) { in handleGetMonthLength() 150 extendedYear += ClockMath::floorDivide(month, 12, month); in handleGetMonthLength() 153 return isLeapYear(extendedYear) ? kPersianLeapMonthLength[month] : kPersianMonthLength[month]; in handleGetMonthLength() 168 int32_t PersianCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, UBool /*useMonth*/) … in handleComputeMonthStart() argument 171 if (month < 0 || month > 11) { in handleComputeMonthStart() 172 eyear += ClockMath::floorDivide(month, 12, month); in handleComputeMonthStart() 177 if (month != 0) { in handleComputeMonthStart() [all …]
|
/external/libcxx/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/ |
D | plus_minus_equal.pass.cpp | 38 using month = std::chrono::month; in main() typedef 41 ASSERT_NOEXCEPT(std::declval<month&>() += std::declval<months&>()); in main() 42 ASSERT_NOEXCEPT(std::declval<month&>() -= std::declval<months&>()); in main() 43 ASSERT_SAME_TYPE(month&, decltype(std::declval<month&>() += std::declval<months&>())); in main() 44 ASSERT_SAME_TYPE(month&, decltype(std::declval<month&>() -= std::declval<months&>())); in main() 46 static_assert(testConstexpr<month, months>(), ""); in main() 50 month month(i); in main() local 54 assert(static_cast<unsigned>(month += months{10}) == static_cast<unsigned>(exp)); in main() 55 assert(static_cast<unsigned>(month) == static_cast<unsigned>(exp)); in main() 60 month month(i); in main() local [all …]
|
D | decrement.pass.cpp | 36 using month = std::chrono::month; in main() typedef 38 ASSERT_NOEXCEPT(--(std::declval<month&>()) ); in main() 39 ASSERT_NOEXCEPT( (std::declval<month&>())--); in main() 41 ASSERT_SAME_TYPE(month , decltype( std::declval<month&>()--)); in main() 42 ASSERT_SAME_TYPE(month&, decltype(--std::declval<month&>() )); in main() 44 static_assert(testConstexpr<month>(), ""); in main() 48 month month(i); in main() local 49 assert(static_cast<unsigned>(--month) == i - 1); in main() 50 assert(static_cast<unsigned>(month--) == i - 1); in main() 51 assert(static_cast<unsigned>(month) == i - 2); in main()
|
D | increment.pass.cpp | 36 using month = std::chrono::month; in main() typedef 37 ASSERT_NOEXCEPT(++(std::declval<month&>()) ); in main() 38 ASSERT_NOEXCEPT( (std::declval<month&>())++); in main() 40 ASSERT_SAME_TYPE(month , decltype( std::declval<month&>()++)); in main() 41 ASSERT_SAME_TYPE(month&, decltype(++std::declval<month&>() )); in main() 43 static_assert(testConstexpr<month>(), ""); in main() 47 month month(i); in main() local 48 assert(static_cast<unsigned>(++month) == i + 1); in main() 49 assert(static_cast<unsigned>(month++) == i + 1); in main() 50 assert(static_cast<unsigned>(month) == i + 2); in main()
|
/external/icu/icu4c/source/test/testdata/ |
D | calendar.txt | 28 // "0/1/1912/june/4 == gregorian year=1912, ERA=AD, same month, same day 45 // [before minguo]2 1[month] 24[day] -> 1910-1-24 220 "MONTH=3", // month + 3 227 "MONTH=1", // month + 1 234 "MONTH=-1", // month - 1 237 { // month=3 is a leap month 241 "MONTH=3", // month + 3 244 { // month=3 is a leap month 248 "MONTH=2", // month + 2 251 { // month=3 is a leap month [all …]
|
/external/libcxx/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/ |
D | day.pass.cpp | 26 using month = std::chrono::month; in main() typedef 35 static_assert( year_month_day_last{year{2020}, month_day_last{month{ 1}}}.day() == day{31}, ""); in main() 36 static_assert( year_month_day_last{year{2020}, month_day_last{month{ 2}}}.day() == day{29}, ""); in main() 37 static_assert( year_month_day_last{year{2020}, month_day_last{month{ 3}}}.day() == day{31}, ""); in main() 38 static_assert( year_month_day_last{year{2020}, month_day_last{month{ 4}}}.day() == day{30}, ""); in main() 39 static_assert( year_month_day_last{year{2020}, month_day_last{month{ 5}}}.day() == day{31}, ""); in main() 40 static_assert( year_month_day_last{year{2020}, month_day_last{month{ 6}}}.day() == day{30}, ""); in main() 41 static_assert( year_month_day_last{year{2020}, month_day_last{month{ 7}}}.day() == day{31}, ""); in main() 42 static_assert( year_month_day_last{year{2020}, month_day_last{month{ 8}}}.day() == day{31}, ""); in main() 43 static_assert( year_month_day_last{year{2020}, month_day_last{month{ 9}}}.day() == day{30}, ""); in main() [all …]
|
D | plus_minus_equal_month.pass.cpp | 26 if (static_cast<unsigned>((d1 ).month()) != 1) return false; in testConstexpr() 27 if (static_cast<unsigned>((d1 += Ds{ 1}).month()) != 2) return false; in testConstexpr() 28 if (static_cast<unsigned>((d1 += Ds{ 2}).month()) != 4) return false; in testConstexpr() 29 if (static_cast<unsigned>((d1 += Ds{12}).month()) != 4) return false; in testConstexpr() 30 if (static_cast<unsigned>((d1 -= Ds{ 1}).month()) != 3) return false; in testConstexpr() 31 if (static_cast<unsigned>((d1 -= Ds{ 2}).month()) != 1) return false; in testConstexpr() 32 if (static_cast<unsigned>((d1 -= Ds{12}).month()) != 1) return false; in testConstexpr() 39 using month = std::chrono::month; in main() typedef 50 …texpr<year_month_day_last, months>(year_month_day_last{year{1234}, month_day_last{month{1}}}), ""); in main() 55 month_day_last mdl{month{i}}; in main() [all …]
|
/external/libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/ |
D | plus_minus_equal_month.pass.cpp | 26 if (static_cast<unsigned>((d1 ).month()) != 1) return false; in testConstexpr() 27 if (static_cast<unsigned>((d1 += Ds{ 1}).month()) != 2) return false; in testConstexpr() 28 if (static_cast<unsigned>((d1 += Ds{ 2}).month()) != 4) return false; in testConstexpr() 29 if (static_cast<unsigned>((d1 += Ds{12}).month()) != 4) return false; in testConstexpr() 30 if (static_cast<unsigned>((d1 -= Ds{ 1}).month()) != 3) return false; in testConstexpr() 31 if (static_cast<unsigned>((d1 -= Ds{ 2}).month()) != 1) return false; in testConstexpr() 32 if (static_cast<unsigned>((d1 -= Ds{12}).month()) != 1) return false; in testConstexpr() 38 using month = std::chrono::month; in main() typedef 49 static_assert(testConstexpr<year_month, months>(year_month{year{1234}, month{1}}), ""); in main() 54 year_month ym(y, month{i}); in main() [all …]
|
/external/python/cpython2/Demo/classes/ |
D | Dates.py | 73 def _days_in_month(month, year): # number of days in month of year argument 74 if month == 2 and _is_leap(year): return 29 75 return _DAYS_IN_MONTH[month-1] 77 def _days_before_month(month, year): # number of days in year before month argument 78 return _DAYS_BEFORE_MONTH[month-1] + (month > 2 and _is_leap(year)) 82 _days_before_month(date.month, date.year) + \ 92 del ans.ord, ans.month, ans.day, ans.year # un-initialize it 107 month = min(n//29 + 1, 12) 108 dbm = _days_before_month(month, year) 110 month = month - 1 [all …]
|
/external/protobuf/src/google/protobuf/stubs/ |
D | time.cc | 62 int64 SecondsPerMonth(int month, bool leap) { in SecondsPerMonth() argument 63 if (month == 2 && leap) { in SecondsPerMonth() 64 return kSecondsPerDay * (kDaysInMonth[month] + 1); in SecondsPerMonth() 66 return kSecondsPerDay * kDaysInMonth[month]; in SecondsPerMonth() 75 time.month < 1 || time.month > 12 || in ValidateDateTime() 82 if (time.month == 2 && IsLeapYear(time.year)) { in ValidateDateTime() 83 return time.month <= kDaysInMonth[time.month] + 1; in ValidateDateTime() 85 return time.month <= kDaysInMonth[time.month]; in ValidateDateTime() 114 assert(time.month >= 1 && time.month <= 12); in SecondsSinceCommonEra() 115 int month = time.month; in SecondsSinceCommonEra() local [all …]
|