/third_party/protobuf/src/google/protobuf/stubs/ |
H A 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 in SecondsPer4Years() 50 IsLeapYear(int year) IsLeapYear() argument 54 SecondsPerYear(int year) SecondsPerYear() argument 95 int year = 1; SecondsSinceCommonEra() local 217 int year = 1; SecondsToDateTime() local [all...] |
/third_party/ltp/lib/ |
H A 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*36 in tst_mktime() 49 rtc_month_days(unsigned int month, unsigned int year) rtc_month_days() argument 60 unsigned int month, year, secs; tst_rtc_time_to_tm() local [all...] |
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/util/ |
H A 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 363 HebrewCalendar(int year, int month, int date) HebrewCalendar() argument 402 HebrewCalendar(int year, int month, int date, int hour, int minute, int second) HebrewCalendar() argument 608 startOfYear(int year) startOfYear() argument 662 yearType(int year) yearType() argument 695 isLeapYear(int year) isLeapYear() argument 701 monthsInYear(int year) monthsInYear() argument [all...] |
H A D | AnnualTimeZoneRule.java | 27 * The constant representing the maximum year used for designating a rule is permanent. 47 * @param startYear The first year when this rule takes effect. 48 * @param endYear The last year when this rule takes effect. If this 74 * Gets the first year when this rule takes effect. 76 * @return The start year of this rule. The year is in Gregorian calendar 86 * Gets the end year when this rule takes effect. 88 * @return The end year of this rule (inclusive). The year is in Gregorian calendar 98 * Gets the time when this rule takes effect in the given year 111 getStartInYear(int year, int prevRawOffset, int prevDSTSavings) getStartInYear() argument [all...] |
H A D | PersianCalendar.java | 23 * in various ways, except its leap year rule, which is determined 24 * astronomically. The Persian year starts around the March equinox. 34 * The official rule for determination of the beginning of the Persian year 41 * expected that for about one year in every twenty-four years, the Afghan 46 * here, commonly known as the 33-year cycle rule, matches the astronomical 49 * commonly known algorithm, the 2820-year cycle, has been incorrectly 50 * designed to follow the tropical year instead of the spring equinoctial 51 * year, and fails to match the astronomical one as early as 2025 CE. 90 // len2 length of month in a leap year 91 // st days in year befor 223 PersianCalendar(int year, int month, int date) PersianCalendar() argument 251 PersianCalendar(int year, int month, int date, int hour, int minute, int second) PersianCalendar() argument 310 isLeapYear(int year) isLeapYear() argument [all...] |
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/util/ |
H A 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 343 HebrewCalendar(int year, int month, int date) HebrewCalendar() argument 380 HebrewCalendar(int year, int month, int date, int hour, int minute, int second) HebrewCalendar() argument 582 startOfYear(int year) startOfYear() argument 635 yearType(int year) yearType() argument 669 isLeapYear(int year) isLeapYear() argument 675 monthsInYear(int year) monthsInYear() argument [all...] |
H A 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 234 IndianCalendar(int year, int month, int date) IndianCalendar() argument 260 IndianCalendar(int year, int month, int date, int hour, int minute, int second) IndianCalendar() argument 413 handleComputeMonthStart(int year, int month, boolean useMonth) handleComputeMonthStart() argument 439 IndianToJD(int year, int month, int date) IndianToJD() argument 478 gregorianToJD(int year, int month, int date) gregorianToJD() argument 539 isGregorianLeap(int year) isGregorianLeap() argument [all...] |
H A D | AnnualTimeZoneRule.java | 28 * The constant representing the maximum year used for designating a rule is permanent. 47 * @param startYear The first year when this rule takes effect. 48 * @param endYear The last year when this rule takes effect. If this 70 * Gets the first year when this rule takes effect. 72 * @return The start year of this rule. The year is in Gregorian calendar 80 * Gets the end year when this rule takes effect. 82 * @return The end year of this rule (inclusive). The year is in Gregorian calendar 90 * Gets the time when this rule takes effect in the given year 101 getStartInYear(int year, int prevRawOffset, int prevDSTSavings) getStartInYear() argument [all...] |
H A D | PersianCalendar.java | 24 * in various ways, except its leap year rule, which is determined 25 * astronomically. The Persian year starts around the March equinox. 35 * The official rule for determination of the beginning of the Persian year 42 * expected that for about one year in every twenty-four years, the Afghan 47 * here, commonly known as the 33-year cycle rule, matches the astronomical 50 * commonly known algorithm, the 2820-year cycle, has been incorrectly 51 * designed to follow the tropical year instead of the spring equinoctial 52 * year, and fails to match the astronomical one as early as 2025 CE. 92 // len2 length of month in a leap year 93 // st days in year befor 225 PersianCalendar(int year, int month, int date) PersianCalendar() argument 253 PersianCalendar(int year, int month, int date, int hour, int minute, int second) PersianCalendar() argument 312 isLeapYear(int year) isLeapYear() argument [all...] |
/third_party/node/deps/icu-small/source/i18n/ |
H A D | islamcal.cpp | 312 * Determine whether a year is a leap year in the Islamic civil calendar 314 UBool IslamicCalendar::civilLeapYear(int32_t year) in civilLeapYear() argument 316 return (14 + 11 * year) % 30 < 11; in civilLeapYear() 320 * Return the day # on which the given year starts. Days are counted 323 int32_t IslamicCalendar::yearStart(int32_t year) const{ in yearStart() 324 return trueMonthStart(12*(year-1)); in yearStart() 331 * @param year The hijri year 334 int32_t IslamicCalendar::monthStart(int32_t year, int32_ argument 488 int32_t year; handleGetExtendedYear() local 539 int32_t year = month >= 0 ? ((month / 12) + 1) : ((month + 1 ) / 12); handleComputeFields() local 559 gregoYearFromIslamicStart(int32_t year) gregoYearFromIslamicStart() argument 578 int32_t year = get(UCAL_EXTENDED_YEAR, status); getRelatedYear() local 585 firstIslamicStartYearFromGrego(int32_t year) firstIslamicStartYearFromGrego() argument 602 setRelatedYear(int32_t year) setRelatedYear() argument 701 monthStart(int32_t year, int32_t month) const monthStart() argument 754 int32_t year = static_cast<int32_t>( handleComputeFields() local [all...] |
H A D | persncal.cpp | 29 = {0,31,62,93,124,155,186,216,246,276,306,336}; // 0-based, for day-in-year 109 * Determine whether a year is a leap year in the Persian calendar 111 UBool PersianCalendar::isLeapYear(int32_t year) in isLeapYear() argument 114 ClockMath::floorDivide(25 * year + 11, 33, &remainder); in isLeapYear() 119 * Return the day # on which the given year starts. Days are counted 122 int32_t PersianCalendar::yearStart(int32_t year) { in yearStart() argument 123 return handleComputeMonthStart(year,0,false); in yearStart() 130 * @param year The Persian year 133 monthStart(int32_t year, int32_t month) const monthStart() argument 190 int32_t year; handleGetExtendedYear() local 214 int32_t year, month, dayOfMonth, dayOfYear; handleComputeFields() local 242 int32_t year = get(UCAL_EXTENDED_YEAR, status); getRelatedYear() local 249 setRelatedYear(int32_t year) setRelatedYear() argument [all...] |
H A D | hebrwcal.cpp | 73 * Due to the rules for postponing the start of the year to avoid having 74 * certain holidays fall on the sabbath, the year can end up being three 95 * The cumulative # of days to the end of each month in a non-leap year 119 * The cumulative # of days to the end of each month in a leap year 231 int32_t year = get(UCAL_YEAR, status); in add() local 237 if (acrossAdar1 && month>=ADAR_1 && !isLeapYear(year)) { in add() 244 ++year; in add() 251 if (acrossAdar1 && month<=ADAR_1 && !isLeapYear(year)) { in add() 258 --year; in add() 263 set(UCAL_YEAR, year); in add() 324 int32_t year = get(UCAL_YEAR, status); roll() local 394 startOfYear(int32_t year, UErrorCode &status) startOfYear() argument 479 isLeapYear(int32_t year) isLeapYear() argument 485 monthsInYear(int32_t year) monthsInYear() argument 576 int32_t year = (int32_t)(ClockMath::floorDivide((19. * m + 234.), 235.) + 1.); // Years (approx) handleComputeFields() local 633 int32_t year; handleGetExtendedYear() local 683 int32_t year = get(UCAL_EXTENDED_YEAR, status); getRelatedYear() local 690 setRelatedYear(int32_t year) setRelatedYear() argument 779 int32_t year = nonConstThis->handleGetExtendedYear(); internalGetMonth() local [all...] |
H A 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, wit 271 isLeapYear(int32_t year) isLeapYear() argument 277 monthLength(int32_t year, int32_t month) monthLength() argument 286 dayToFields(double day, int32_t& year, int32_t& month, int32_t& dom, int32_t& dow) dayToFields() argument [all...] |
/third_party/icu/icu4c/source/i18n/ |
H A D | hebrwcal.cpp | 71 * Due to the rules for postponing the start of the year to avoid having 72 * certain holidays fall on the sabbath, the year can end up being three 93 * The cumulative # of days to the end of each month in a non-leap year 117 * The cumulative # of days to the end of each month in a leap year 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); roll() local 390 startOfYear(int32_t year, UErrorCode &status) startOfYear() argument 475 isLeapYear(int32_t year) isLeapYear() argument 481 monthsInYear(int32_t year) monthsInYear() argument 571 int32_t year = (int32_t)(ClockMath::floorDivide((19. * m + 234.), 235.) + 1.); // Years (approx) handleComputeFields() local 623 int32_t year; handleGetExtendedYear() local [all...] |
H A 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, wit 271 isLeapYear(int32_t year) isLeapYear() argument 277 monthLength(int32_t year, int32_t month) monthLength() argument 286 dayToFields(double day, int32_t& year, int32_t& month, int32_t& dom, int32_t& dow) dayToFields() argument [all...] |
H A D | persncal.cpp | 29 = {0,31,62,93,124,155,186,216,246,276,306,336}; // 0-based, for day-in-year 108 * Determine whether a year is a leap year in the Persian calendar 110 UBool PersianCalendar::isLeapYear(int32_t year) in isLeapYear() argument 113 ClockMath::floorDivide(25 * year + 11, 33, &remainder); in isLeapYear() 118 * Return the day # on which the given year starts. Days are counted 121 int32_t PersianCalendar::yearStart(int32_t year) { in yearStart() argument 122 return handleComputeMonthStart(year,0,false); in yearStart() 129 * @param year The Persian year 132 monthStart(int32_t year, int32_t month) const monthStart() argument 189 int32_t year; handleGetExtendedYear() local 213 int32_t year, month, dayOfMonth, dayOfYear; handleComputeFields() local [all...] |
/third_party/skia/third_party/externals/icu/source/i18n/ |
H A D | hebrwcal.cpp | 71 * Due to the rules for postponing the start of the year to avoid having 72 * certain holidays fall on the sabbath, the year can end up being three 93 * The cumulative # of days to the end of each month in a non-leap year 117 * The cumulative # of days to the end of each month in a leap year 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); roll() local 390 startOfYear(int32_t year, UErrorCode &status) startOfYear() argument 475 isLeapYear(int32_t year) isLeapYear() argument 481 monthsInYear(int32_t year) monthsInYear() argument 571 int32_t year = (int32_t)(ClockMath::floorDivide((19. * m + 234.), 235.) + 1.); // Years (approx) handleComputeFields() local 623 int32_t year; handleGetExtendedYear() local [all...] |
H A 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, wit 271 isLeapYear(int32_t year) isLeapYear() argument 277 monthLength(int32_t year, int32_t month) monthLength() argument 286 dayToFields(double day, int32_t& year, int32_t& month, int32_t& dom, int32_t& dow) dayToFields() argument [all...] |
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/ |
H A D | Grego.java | 58 * Return true if the given year is a leap year. 59 * @param year Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc. 60 * @return true if the year is a leap year 62 public static final boolean isLeapYear(int year) { in isLeapYear() argument 63 // year&0x3 == year%4 in isLeapYear() 64 return ((year in isLeapYear() 73 monthLength(int year, int month) monthLength() argument 83 previousMonthLength(int year, int month) previousMonthLength() argument 95 fieldsToDay(int year, int month, int dom) fieldsToDay() argument 205 getDayOfWeekInMonth(int year, int month, int dayOfMonth) getDayOfWeekInMonth() argument [all...] |
H A D | EraRules.java | 144 * @return An int array including values of year, month, day of month in this order. 145 * When an era has no start date, the result will be January 1st in year 156 * Gets start year of an era 158 * @return The first year of an era. When a era has no start date, minimum integer 170 * Returns era index for the specified year/month/day. 171 * @param year Year 176 public int getEraIndex(int year, int month, int day) { in getEraIndex() argument 178 throw new IllegalArgumentException("Illegal date - year:" + year + "month:" + month + "day:" + day); in getEraIndex() 185 if (compareEncodedDateWithYMD(startDates[getCurrentEraIndex()], year, mont in getEraIndex() 241 isValidRuleStartDate(int year, int month, int day) isValidRuleStartDate() argument 256 encodeDate(int year, int month, int day) encodeDate() argument 292 compareEncodedDateWithYMD(int encoded, int year, int month, int day) compareEncodedDateWithYMD() argument [all...] |
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/impl/ |
H A D | Grego.java | 60 * Return true if the given year is a leap year. 61 * @param year Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc. 62 * @return true if the year is a leap year 64 public static final boolean isLeapYear(int year) { in isLeapYear() argument 65 // year&0x3 == year%4 in isLeapYear() 66 return ((year in isLeapYear() 75 monthLength(int year, int month) monthLength() argument 85 previousMonthLength(int year, int month) previousMonthLength() argument 97 fieldsToDay(int year, int month, int dom) fieldsToDay() argument 207 getDayOfWeekInMonth(int year, int month, int dayOfMonth) getDayOfWeekInMonth() argument [all...] |
H A D | EraRules.java | 146 * @return An int array including values of year, month, day of month in this order. 147 * When an era has no start date, the result will be January 1st in year 158 * Gets start year of an era 160 * @return The first year of an era. When a era has no start date, minimum integer 172 * Returns era index for the specified year/month/day. 173 * @param year Year 178 public int getEraIndex(int year, int month, int day) { in getEraIndex() argument 180 throw new IllegalArgumentException("Illegal date - year:" + year + "month:" + month + "day:" + day); in getEraIndex() 187 if (compareEncodedDateWithYMD(startDates[getCurrentEraIndex()], year, mont in getEraIndex() 243 isValidRuleStartDate(int year, int month, int day) isValidRuleStartDate() argument 258 encodeDate(int year, int month, int day) encodeDate() argument 294 compareEncodedDateWithYMD(int encoded, int year, int month, int day) compareEncodedDateWithYMD() argument [all...] |
/third_party/node/deps/v8/src/date/ |
H A D | date.cc | 82 void DateCache::YearMonthDayFromDays(int days, int* year, int* month, in YearMonthDayFromDays() argument 86 // the same year and month as the cached 'days'. in YearMonthDayFromDays() 91 *year = ymd_year_; in YearMonthDayFromDays() 100 *year = 400 * (days / kDaysIn400Years) - kYearsOffset; in YearMonthDayFromDays() 103 DCHECK_EQ(save_days, DaysFromYearMonth(*year, 0) + days); in YearMonthDayFromDays() 108 *year += 100 * yd1; in YearMonthDayFromDays() 113 *year += 4 * yd2; in YearMonthDayFromDays() 118 *year += yd3; in YearMonthDayFromDays() 125 DCHECK(is_leap == ((*year % 4 == 0) && (*year in YearMonthDayFromDays() 161 DaysFromYearMonth(int year, int month) DaysFromYearMonth() argument 200 BreakDownTime(int64_t time_ms, int* year, int* month, int* day, int* weekday, int* hour, int* min, int* sec, int* ms) BreakDownTime() argument 482 MakeDay(double year, double month, double date) MakeDay() argument 565 int year, month, day, weekday, hour, min, sec, ms; ToDateString() local [all...] |
/third_party/python/Lib/ |
H A D | calendar.py | 102 def isleap(year): 104 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) 115 def weekday(year, month, day): 116 """Return weekday (0-6 ~ Mon-Sun) for year, month (1-12), day (1-31).""" 117 if not datetime.MINYEAR <= year <= datetime.MAXYEAR: 118 year = 2000 + year % 400 119 return datetime.date(year, mont [all...] |
/third_party/skia/third_party/externals/abseil-cpp/absl/time/internal/cctz/src/ |
H A D | civil_time_test.cc | 57 static_assert(cy.year() == 2016, "Normal.year"); in TEST() 62 static_assert(cy.year() == 2016, "Conversion.year"); in TEST() 79 static_assert(cs.year() == 2016, "Normalized.year"); in TEST() 89 static_assert(cs.year() == 2016, "SecondOverflow.year"); in TEST() 99 static_assert(cs.year() == 2016, "SecondUnderflow.year"); in TEST() [all...] |