/third_party/protobuf/src/google/protobuf/stubs/ |
D | time.cc | 29 int64 SecondsPer100Years(int year) { in SecondsPer100Years() argument 30 if (year % 400 == 0 || year % 400 > 300) { in SecondsPer100Years() 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 55 return kSecondsPerDay * (IsLeapYear(year) ? 366 : 365); in SecondsPerYear() 74 if (time.year < 1 || time.year > 9999 || in ValidateDateTime() [all …]
|
/third_party/boost/boost/date_time/ |
D | local_timezone_defs.hpp | 75 static date_type local_dst_start_day(year_type year) in local_dst_start_day() 77 if (year < 2007) { in local_dst_start_day() 78 start_rule_functor_pre2007 start1(start_day(year), in local_dst_start_day() 79 start_month(year)); in local_dst_start_day() 80 return start1.get_date(year); in local_dst_start_day() 83 start_day(year), in local_dst_start_day() 84 start_month(year)); in local_dst_start_day() 85 return start.get_date(year); in local_dst_start_day() 88 static date_type local_dst_end_day(year_type year) in local_dst_end_day() 90 if (year < 2007) { in local_dst_end_day() [all …]
|
/third_party/typescript/tests/baselines/reference/ |
D | externModule.types | 21 constructor(year: number, month: number); 22 >year : number 25 constructor(year: number, month: number, date: number); 26 >year : number 30 constructor(year: number, month: number, date: number, hours: number); 31 >year : number 36 constructor(year: number, month: number, date: number, hours: number, minutes: number); 37 >year : number 43 …constructor(year: number, month: number, date: number, hours: number, minutes: number, seconds: nu… 44 >year : number [all …]
|
D | externModule.symbols | 18 constructor(year: number, month: number); 19 >year : Symbol(year, Decl(externModule.ts, 10, 17)) 22 constructor(year: number, month: number, date: number); 23 >year : Symbol(year, Decl(externModule.ts, 11, 17)) 27 constructor(year: number, month: number, date: number, hours: number); 28 >year : Symbol(year, Decl(externModule.ts, 12, 17)) 33 constructor(year: number, month: number, date: number, hours: number, minutes: number); 34 >year : Symbol(year, Decl(externModule.ts, 13, 17)) 40 …constructor(year: number, month: number, date: number, hours: number, minutes: number, seconds: nu… 41 >year : Symbol(year, Decl(externModule.ts, 14, 17)) [all …]
|
/third_party/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 365 this.set(YEAR, year); in HebrewCalendar() 402 public HebrewCalendar(int year, int month, int date, int hour, in HebrewCalendar() argument 406 this.set(YEAR, year); in HebrewCalendar() 460 int year = get(YEAR); in add() local 466 if (acrossAdar1 && month>=ADAR_1 && !isLeapYear(year)) { in add() 473 ++year; in add() 480 if (acrossAdar1 && month<=ADAR_1 && !isLeapYear(year)) { in add() 487 --year; in add() 492 set(YEAR, year); in add() [all …]
|
D | IslamicCalendar.java | 285 public IslamicCalendar(int year, int month, int date) in IslamicCalendar() argument 288 this.set(Calendar.YEAR, year); in IslamicCalendar() 310 public IslamicCalendar(int year, int month, int date, int hour, in IslamicCalendar() argument 314 this.set(Calendar.YEAR, year); in IslamicCalendar() 578 private final static boolean civilLeapYear(int year) in civilLeapYear() argument 580 return (14 + 11 * year) % 30 < 11; in civilLeapYear() 587 private long yearStart(int year) { in yearStart() argument 591 …|| (cType == CalculationType.ISLAMIC_UMALQURA && (year < UMALQURA_YEAR_START || year > UMALQURA_YE… in yearStart() 592 ys = (year-1)*354 + (long)Math.floor((3+11*year)/30.0); in yearStart() 594 ys = trueMonthStart(12*(year-1)); in yearStart() [all …]
|
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/util/ |
D | HebrewCalendar.java | 343 public HebrewCalendar(int year, int month, int date) { in HebrewCalendar() argument 345 this.set(YEAR, year); in HebrewCalendar() 380 public HebrewCalendar(int year, int month, int date, int hour, in HebrewCalendar() argument 384 this.set(YEAR, year); in HebrewCalendar() 436 int year = get(YEAR); in add() local 442 if (acrossAdar1 && month>=ADAR_1 && !isLeapYear(year)) { in add() 449 ++year; in add() 456 if (acrossAdar1 && month<=ADAR_1 && !isLeapYear(year)) { in add() 463 --year; in add() 468 set(YEAR, year); in add() [all …]
|
D | IndianCalendar.java | 234 public IndianCalendar(int year, int month, int date) { in IndianCalendar() argument 236 this.set(Calendar.YEAR, year); in IndianCalendar() 260 public IndianCalendar(int year, int month, int date, int hour, in IndianCalendar() argument 264 this.set(Calendar.YEAR, year); in IndianCalendar() 289 int year; in handleGetExtendedYear() local 292 year = internalGet(EXTENDED_YEAR, 1); in handleGetExtendedYear() 295 year = internalGet(YEAR, 1); in handleGetExtendedYear() 298 return year; in handleGetExtendedYear() 413 protected int handleComputeMonthStart(int year, int month, boolean useMonth) { in handleComputeMonthStart() argument 420 year += month / 12; in handleComputeMonthStart() [all …]
|
D | IslamicCalendar.java | 265 public IslamicCalendar(int year, int month, int date) in IslamicCalendar() argument 268 this.set(Calendar.YEAR, year); in IslamicCalendar() 289 public IslamicCalendar(int year, int month, int date, int hour, in IslamicCalendar() argument 293 this.set(Calendar.YEAR, year); in IslamicCalendar() 556 private final static boolean civilLeapYear(int year) in civilLeapYear() argument 558 return (14 + 11 * year) % 30 < 11; in civilLeapYear() 565 private long yearStart(int year) { in yearStart() argument 569 …|| (cType == CalculationType.ISLAMIC_UMALQURA && (year < UMALQURA_YEAR_START || year > UMALQURA_YE… in yearStart() 570 ys = (year-1)*354 + (long)Math.floor((3+11*year)/30.0); in yearStart() 572 ys = trueMonthStart(12*(year-1)); in yearStart() [all …]
|
/third_party/ltp/lib/ |
D | tst_rtctime.c | 20 static inline bool is_leap_year(unsigned int year) in is_leap_year() argument 22 return (!(year % 4) && (year % 100)) || !(year % 400); in is_leap_year() 29 unsigned int mon = mon0, year = year0; in tst_mktime() local 35 year -= 1; in tst_mktime() 39 (year/4 - year/100 + year/400 + 367*mon/12 + day) + in tst_mktime() 40 year*365 - 719499 in tst_mktime() 49 static int rtc_month_days(unsigned int month, unsigned int year) in rtc_month_days() argument 51 return rtc_days_in_month[month] + (is_leap_year(year) && month == 1); in rtc_month_days() 60 unsigned int month, year, secs; in tst_rtc_time_to_tm() local 70 year = 1970 + days / 365; in tst_rtc_time_to_tm() [all …]
|
/third_party/flutter/skia/third_party/externals/icu/source/i18n/ |
D | hebrwcal.cpp | 228 int32_t year = get(UCAL_YEAR, status); in add() local 234 if (acrossAdar1 && month>=ADAR_1 && !isLeapYear(year)) { in add() 241 ++year; in add() 248 if (acrossAdar1 && month<=ADAR_1 && !isLeapYear(year)) { in add() 255 --year; in add() 260 set(UCAL_YEAR, year); in add() 320 int32_t year = get(UCAL_YEAR, status); in roll() local 322 UBool leapYear = isLeapYear(year); in roll() 323 int32_t yearLength = monthsInYear(year); in roll() 390 int32_t HebrewCalendar::startOfYear(int32_t year, UErrorCode &status) in startOfYear() argument [all …]
|
D | islamcal.cpp | 361 UBool IslamicCalendar::civilLeapYear(int32_t year) in civilLeapYear() argument 363 return (14 + 11 * year) % 30 < 11; in civilLeapYear() 370 int32_t IslamicCalendar::yearStart(int32_t year) const{ in yearStart() 372 (cType == UMALQURA && (year < UMALQURA_YEAR_START || year > UMALQURA_YEAR_END))) in yearStart() 374 return (year-1)*354 + ClockMath::floorDivide((3+11*year),30); in yearStart() 376 return trueMonthStart(12*(year-1)); in yearStart() 378 year -= UMALQURA_YEAR_START; in yearStart() 380 int32_t yrStartLinearEstimate = (int32_t)((354.36720 * (double)year) + 460322.05 + 0.5); in yearStart() 382 return yrStartLinearEstimate + umAlQuraYrStartEstimateFix[year]; in yearStart() 393 int32_t IslamicCalendar::monthStart(int32_t year, int32_t month) const { in monthStart() argument [all …]
|
D | indiancal.cpp | 97 static UBool isGregorianLeap(int32_t year) in isGregorianLeap() argument 99 return ((year % 4) == 0) && (!(((year % 100) == 0) && ((year % 400) != 0))); in isGregorianLeap() 143 static double gregorianToJD(int32_t year, int32_t month, int32_t date) { in gregorianToJD() argument 145 (365 * (year - 1)) + in gregorianToJD() 146 uprv_floor((year - 1) / 4) + in gregorianToJD() 147 (-uprv_floor((year - 1) / 100)) + in gregorianToJD() 148 uprv_floor((year - 1) / 400) + in gregorianToJD() 151 (isGregorianLeap(year) ? -1 : -2) in gregorianToJD() 164 int32_t year, month, day; in jdToGregorian() local 174 year = (int32_t)((quadricent * 400) + (cent * 100) + (quad * 4) + yindex); in jdToGregorian() [all …]
|
/third_party/skia/third_party/externals/icu/source/i18n/ |
D | hebrwcal.cpp | 228 int32_t year = get(UCAL_YEAR, status); in add() local 234 if (acrossAdar1 && month>=ADAR_1 && !isLeapYear(year)) { in add() 241 ++year; in add() 248 if (acrossAdar1 && month<=ADAR_1 && !isLeapYear(year)) { in add() 255 --year; in add() 260 set(UCAL_YEAR, year); in add() 320 int32_t year = get(UCAL_YEAR, status); in roll() local 322 UBool leapYear = isLeapYear(year); in roll() 323 int32_t yearLength = monthsInYear(year); in roll() 390 int32_t HebrewCalendar::startOfYear(int32_t year, UErrorCode &status) in startOfYear() argument [all …]
|
D | islamcal.cpp | 358 UBool IslamicCalendar::civilLeapYear(int32_t year) in civilLeapYear() argument 360 return (14 + 11 * year) % 30 < 11; in civilLeapYear() 367 int32_t IslamicCalendar::yearStart(int32_t year) const{ in yearStart() 369 (cType == UMALQURA && (year < UMALQURA_YEAR_START || year > UMALQURA_YEAR_END))) in yearStart() 371 return (year-1)*354 + ClockMath::floorDivide((3+11*(int64_t)year),(int64_t)30); in yearStart() 373 return trueMonthStart(12*(year-1)); in yearStart() 375 year -= UMALQURA_YEAR_START; in yearStart() 377 int32_t yrStartLinearEstimate = (int32_t)((354.36720 * (double)year) + 460322.05 + 0.5); in yearStart() 379 return yrStartLinearEstimate + umAlQuraYrStartEstimateFix[year]; in yearStart() 390 int32_t IslamicCalendar::monthStart(int32_t year, int32_t month) const { in monthStart() argument [all …]
|
/third_party/node/deps/icu-small/source/i18n/ |
D | hebrwcal.cpp | 228 int32_t year = get(UCAL_YEAR, status); in add() local 234 if (acrossAdar1 && month>=ADAR_1 && !isLeapYear(year)) { in add() 241 ++year; in add() 248 if (acrossAdar1 && month<=ADAR_1 && !isLeapYear(year)) { in add() 255 --year; in add() 260 set(UCAL_YEAR, year); in add() 320 int32_t year = get(UCAL_YEAR, status); in roll() local 322 UBool leapYear = isLeapYear(year); in roll() 323 int32_t yearLength = monthsInYear(year); in roll() 390 int32_t HebrewCalendar::startOfYear(int32_t year, UErrorCode &status) in startOfYear() argument [all …]
|
D | islamcal.cpp | 358 UBool IslamicCalendar::civilLeapYear(int32_t year) in civilLeapYear() argument 360 return (14 + 11 * year) % 30 < 11; in civilLeapYear() 367 int32_t IslamicCalendar::yearStart(int32_t year) const{ in yearStart() 369 (cType == UMALQURA && (year < UMALQURA_YEAR_START || year > UMALQURA_YEAR_END))) in yearStart() 371 return (year-1)*354 + ClockMath::floorDivide((3+11*(int64_t)year),(int64_t)30); in yearStart() 373 return trueMonthStart(12*(year-1)); in yearStart() 375 year -= UMALQURA_YEAR_START; in yearStart() 377 int32_t yrStartLinearEstimate = (int32_t)((354.36720 * (double)year) + 460322.05 + 0.5); in yearStart() 379 return yrStartLinearEstimate + umAlQuraYrStartEstimateFix[year]; in yearStart() 390 int32_t IslamicCalendar::monthStart(int32_t year, int32_t month) const { in monthStart() argument [all …]
|
/third_party/icu/icu4c/source/i18n/ |
D | hebrwcal.cpp | 228 int32_t year = get(UCAL_YEAR, status); in add() local 234 if (acrossAdar1 && month>=ADAR_1 && !isLeapYear(year)) { in add() 241 ++year; in add() 248 if (acrossAdar1 && month<=ADAR_1 && !isLeapYear(year)) { in add() 255 --year; in add() 260 set(UCAL_YEAR, year); in add() 320 int32_t year = get(UCAL_YEAR, status); in roll() local 322 UBool leapYear = isLeapYear(year); in roll() 323 int32_t yearLength = monthsInYear(year); in roll() 390 int32_t HebrewCalendar::startOfYear(int32_t year, UErrorCode &status) in startOfYear() argument [all …]
|
D | islamcal.cpp | 358 UBool IslamicCalendar::civilLeapYear(int32_t year) in civilLeapYear() argument 360 return (14 + 11 * year) % 30 < 11; in civilLeapYear() 367 int32_t IslamicCalendar::yearStart(int32_t year) const{ in yearStart() 369 (cType == UMALQURA && (year < UMALQURA_YEAR_START || year > UMALQURA_YEAR_END))) in yearStart() 371 return (year-1)*354 + ClockMath::floorDivide((3+11*(int64_t)year),(int64_t)30); in yearStart() 373 return trueMonthStart(12*(year-1)); in yearStart() 375 year -= UMALQURA_YEAR_START; in yearStart() 377 int32_t yrStartLinearEstimate = (int32_t)((354.36720 * (double)year) + 460322.05 + 0.5); in yearStart() 379 return yrStartLinearEstimate + umAlQuraYrStartEstimateFix[year]; in yearStart() 390 int32_t IslamicCalendar::monthStart(int32_t year, int32_t month) const { in monthStart() argument [all …]
|
/third_party/typescript/tests/cases/compiler/ |
D | externModule.ts | 11 constructor(year: number, month: number); 12 constructor(year: number, month: number, date: number); 13 constructor(year: number, month: number, date: number, hours: number); 14 constructor(year: number, month: number, date: number, hours: number, minutes: number); 15 …constructor(year: number, month: number, date: number, hours: number, minutes: number, seconds: nu… 16 …constructor(year: number, month: number, date: number, hours: number, minutes: number, seconds: nu… 21 static UTC(year: number, month: number): number; 22 static UTC(year: number, month: number, date: number): number; 23 static UTC(year: number, month: number, date: number, hours: number): number; 24 static UTC(year: number, month: number, date: number, hours: number, minutes: number): number; [all …]
|
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/impl/ |
D | Grego.java | 64 public static final boolean isLeapYear(int year) { in isLeapYear() argument 66 return ((year&0x3) == 0) && ((year%100 != 0) || (year%400 == 0)); in isLeapYear() 75 public static final int monthLength(int year, int month) { in monthLength() argument 76 return MONTH_LENGTH[month + (isLeapYear(year) ? 12 : 0)]; in monthLength() 85 public static final int previousMonthLength(int year, int month) { in previousMonthLength() argument 86 return (month > 0) ? monthLength(year, month-1) : 31; in previousMonthLength() 97 public static long fieldsToDay(int year, int month, int dom) { in fieldsToDay() argument 98 int y = year - 1; in fieldsToDay() 102 DAYS_BEFORE[month + (isLeapYear(year) ? 12 : 0)] + dom; // => month/dom in fieldsToDay() 132 int year = (int)(400 * n400 + 100 * n100 + 4 * n4 + n1); in dayToFields() local [all …]
|
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/ |
D | Grego.java | 62 public static final boolean isLeapYear(int year) { in isLeapYear() argument 64 return ((year&0x3) == 0) && ((year%100 != 0) || (year%400 == 0)); in isLeapYear() 73 public static final int monthLength(int year, int month) { in monthLength() argument 74 return MONTH_LENGTH[month + (isLeapYear(year) ? 12 : 0)]; in monthLength() 83 public static final int previousMonthLength(int year, int month) { in previousMonthLength() argument 84 return (month > 0) ? monthLength(year, month-1) : 31; in previousMonthLength() 95 public static long fieldsToDay(int year, int month, int dom) { in fieldsToDay() argument 96 int y = year - 1; in fieldsToDay() 100 DAYS_BEFORE[month + (isLeapYear(year) ? 12 : 0)] + dom; // => month/dom in fieldsToDay() 130 int year = (int)(400 * n400 + 100 * n100 + 4 * n4 + n1); in dayToFields() local [all …]
|
/third_party/python/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 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 125 day1 = weekday(year, month, 1) 126 ndays = mdays[month] + (month == February and isleap(year)) 130 def _monthlen(year, month): argument [all …]
|
/third_party/libsoup/libsoup/ |
D | soup-date.c | 59 is_leap_year (int year) in is_leap_year() argument 61 return (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)); in is_leap_year() 72 day = (date->year - 1) * 365 + ((date->year - 1) / 4) - in rata_die_day() 73 ((date->year - 1) / 100) + ((date->year - 1) / 400); in rata_die_day() 75 if (is_leap_year (date->year) && date->month > 2) in rata_die_day() 83 days_in_month (int month, int year) in days_in_month() argument 85 if (month == 2 && is_leap_year (year)) in days_in_month() 124 date->year += ((date->month - 1) / 12) + 1; in G_DEFINE_BOXED_TYPE() 134 date->year--; in G_DEFINE_BOXED_TYPE() 137 date->day += days_in_month (date->month, date->year); in G_DEFINE_BOXED_TYPE() [all …]
|
/third_party/jerryscript/jerry-core/ecma/builtin-objects/ |
D | ecma-builtin-helpers-date.c | 93 ecma_date_day_from_year (ecma_number_t year) /**< year value */ in ecma_date_day_from_year() argument 95 JERRY_ASSERT (!ecma_number_is_nan (year)); in ecma_date_day_from_year() 97 return (ecma_number_t) (365 * (year - 1970) in ecma_date_day_from_year() 98 + floor ((year - 1969) / 4) in ecma_date_day_from_year() 99 - floor ((year - 1901) / 100) in ecma_date_day_from_year() 100 + floor ((year - 1601) / 400)); in ecma_date_day_from_year() 112 ecma_date_time_from_year (ecma_number_t year) /**< year value */ in ecma_date_time_from_year() argument 114 JERRY_ASSERT (!ecma_number_is_nan (year)); in ecma_date_time_from_year() 116 return ECMA_DATE_MS_PER_DAY * ecma_date_day_from_year (year); in ecma_date_time_from_year() 135 ecma_number_t year = (ecma_number_t) (1970 + 285616); in ecma_date_year_from_time() local [all …]
|