Home
last modified time | relevance | path

Searched refs:year (Results 1 – 25 of 764) sorted by relevance

12345678910>>...31

/external/icu/icu4j/main/classes/core/src/com/ibm/icu/util/
DHebrewCalendar.java361 public HebrewCalendar(int year, int month, int date) { in HebrewCalendar() argument
363 this.set(YEAR, year); in HebrewCalendar()
400 public HebrewCalendar(int year, int month, int date, int hour, in HebrewCalendar() argument
404 this.set(YEAR, year); in HebrewCalendar()
457 int year = get(YEAR); in add() local
463 if (acrossAdar1 && month>=ADAR_1 && !isLeapYear(year)) { in add()
470 ++year; in add()
477 if (acrossAdar1 && month<=ADAR_1 && !isLeapYear(year)) { in add()
484 --year; in add()
489 set(YEAR, year); in add()
[all …]
DIndianCalendar.java254 public IndianCalendar(int year, int month, int date) { in IndianCalendar() argument
256 this.set(Calendar.YEAR, year); in IndianCalendar()
281 public IndianCalendar(int year, int month, int date, int hour, in IndianCalendar() argument
285 this.set(Calendar.YEAR, year); in IndianCalendar()
311 int year; in handleGetExtendedYear() local
314 year = internalGet(EXTENDED_YEAR, 1); in handleGetExtendedYear()
317 year = internalGet(YEAR, 1); in handleGetExtendedYear()
320 return year; in handleGetExtendedYear()
440 protected int handleComputeMonthStart(int year, int month, boolean useMonth) { in handleComputeMonthStart() argument
447 year += month / 12; in handleComputeMonthStart()
[all …]
DIslamicCalendar.java283 public IslamicCalendar(int year, int month, int date) in IslamicCalendar() argument
286 this.set(Calendar.YEAR, year); in IslamicCalendar()
308 public IslamicCalendar(int year, int month, int date, int hour, in IslamicCalendar() argument
312 this.set(Calendar.YEAR, year); in IslamicCalendar()
574 private final static boolean civilLeapYear(int year) in civilLeapYear() argument
576 return (14 + 11 * year) % 30 < 11; in civilLeapYear()
583 private long yearStart(int year) { in yearStart() argument
587 …|| (cType == CalculationType.ISLAMIC_UMALQURA && (year < UMALQURA_YEAR_START || year > UMALQURA_YE… in yearStart()
588 ys = (year-1)*354 + (long)Math.floor((3+11*year)/30.0); in yearStart()
590 ys = trueMonthStart(12*(year-1)); in yearStart()
[all …]
DPersianCalendar.java221 public PersianCalendar(int year, int month, int date) in PersianCalendar() argument
224 this.set(Calendar.YEAR, year); in PersianCalendar()
249 public PersianCalendar(int year, int month, int date, int hour, in PersianCalendar() argument
253 this.set(Calendar.YEAR, year); in PersianCalendar()
308 private final static boolean isLeapYear(int year) in isLeapYear() argument
311 floorDivide(25 * year + 11, 33, remainder); in isLeapYear()
390 int year; in handleGetExtendedYear() local
392 year = internalGet(EXTENDED_YEAR, 1); // Default to year 1 in handleGetExtendedYear()
394 year = internalGet(YEAR, 1); // Default to year 1 in handleGetExtendedYear()
396 return year; in handleGetExtendedYear()
[all …]
DAnnualTimeZoneRule.java109 public Date getStartInYear(int year, int prevRawOffset, int prevDSTSavings) { in getStartInYear() argument
110 if (year < startYear || year > endYear) { in getStartInYear()
118 … ruleDay = Grego.fieldsToDay(year, dateTimeRule.getRuleMonth(), dateTimeRule.getRuleDayOfMonth()); in getStartInYear()
124 ruleDay = Grego.fieldsToDay(year, dateTimeRule.getRuleMonth(), 1); in getStartInYear()
128 ruleDay = Grego.fieldsToDay(year, dateTimeRule.getRuleMonth(), in getStartInYear()
129 Grego.monthLength(year, dateTimeRule.getRuleMonth())); in getStartInYear()
138 if (month == Calendar.FEBRUARY && dom == 29 && !Grego.isLeapYear(year)) { in getStartInYear()
142 ruleDay = Grego.fieldsToDay(year, month, dom); in getStartInYear()
190 int year = fields[0]; in getNextStart() local
191 if (year < startYear) { in getNextStart()
[all …]
DJapaneseCalendar.java155 public JapaneseCalendar(int era, int year, int month, int date) { in JapaneseCalendar() argument
156 super(year, month, date); in JapaneseCalendar()
174 public JapaneseCalendar(int year, int month, int date) { in JapaneseCalendar() argument
175 super(year, month, date); in JapaneseCalendar()
199 public JapaneseCalendar(int year, int month, int date, int hour, in JapaneseCalendar() argument
202 super(year, month, date, hour, minute, second); in JapaneseCalendar()
217 int year; in handleGetExtendedYear() local
220 year = internalGet(EXTENDED_YEAR, GREGORIAN_EPOCH); in handleGetExtendedYear()
223year = internalGet(YEAR, 1) // pin to minimum of year 1 (first year) in handleGetExtendedYear()
227 return year; in handleGetExtendedYear()
[all …]
DCopticCalendar.java203 public CopticCalendar(int year, int month, int date) { in CopticCalendar() argument
204 super(year, month, date); in CopticCalendar()
231 public CopticCalendar(int year, int month, int date, int hour, in CopticCalendar() argument
233 super(year, month, date, hour, minute, second); in CopticCalendar()
273 int era, year; in handleComputeFields() local
283 year = 1 - fields[0]; in handleComputeFields()
286 year = fields[0]; in handleComputeFields()
291 internalSet(YEAR, year); in handleComputeFields()
320 public static int copticToJD(long year, int month, int date) { in copticToJD() argument
321 return ceToJD(year, month, date, JD_EPOCH_OFFSET); in copticToJD()
DTaiwanCalendar.java153 public TaiwanCalendar(int year, int month, int date) { in TaiwanCalendar() argument
154 super(year, month, date); in TaiwanCalendar()
171 public TaiwanCalendar(int year, int month, int date, int hour, in TaiwanCalendar() argument
174 super(year, month, date, hour, minute, second); in TaiwanCalendar()
197 int year = GREGORIAN_EPOCH; in handleGetExtendedYear() local
200 year = internalGet(EXTENDED_YEAR, GREGORIAN_EPOCH); in handleGetExtendedYear()
204 year = internalGet(YEAR, 1) + Taiwan_ERA_START; in handleGetExtendedYear()
206 year = 1 - internalGet(YEAR, 1) + Taiwan_ERA_START; in handleGetExtendedYear()
209 return year; in handleGetExtendedYear()
DEthiopicCalendar.java227 public EthiopicCalendar(int year, int month, int date) { in EthiopicCalendar() argument
228 super(year, month, date); in EthiopicCalendar()
255 public EthiopicCalendar(int year, int month, int date, int hour, in EthiopicCalendar() argument
258 super(year, month, date, hour, minute, second); in EthiopicCalendar()
326 int era, year; in handleComputeFields() local
336 year = fields[0] + AMETE_MIHRET_DELTA; in handleComputeFields()
340 year = fields[0]; in handleComputeFields()
343 year = fields[0] + AMETE_MIHRET_DELTA; in handleComputeFields()
349 internalSet(YEAR, year); in handleComputeFields()
392 public static int EthiopicToJD(long year, int month, int date) { in EthiopicToJD() argument
[all …]
/external/v8/src/
Ddate.js61 function TimeInYear(year) { argument
62 return DaysInYear(year) * msPerDay;
72 function MakeDay(year, month, date) { argument
73 if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) return NAN;
76 year = TO_INTEGER_MAP_MINUS_ZERO(year);
80 if (year < kMinYear || year > kMaxYear ||
86 return %DateMakeDay(year | 0, month | 0) + date - 1;
121 function DateConstructor(year, month, date, hours, minutes, seconds, ms) { argument
134 if (IS_NUMBER(year)) {
135 value = year;
[all …]
Ddate.cc56 int days, int* year, int* month, int* day) { in YearMonthDayFromDays() argument
64 *year = ymd_year_; in YearMonthDayFromDays()
73 *year = 400 * (days / kDaysIn400Years) - kYearsOffset; in YearMonthDayFromDays()
76 DCHECK(DaysFromYearMonth(*year, 0) + days == save_days); in YearMonthDayFromDays()
81 *year += 100 * yd1; in YearMonthDayFromDays()
86 *year += 4 * yd2; in YearMonthDayFromDays()
91 *year += yd3; in YearMonthDayFromDays()
99 DCHECK(is_leap == ((*year % 4 == 0) && (*year % 100 || (*year % 400 == 0)))); in YearMonthDayFromDays()
100 DCHECK(is_leap || ((DaysFromYearMonth(*year, 0) + days) == save_days)); in YearMonthDayFromDays()
101 DCHECK(!is_leap || ((DaysFromYearMonth(*year, 0) + days + 1) == save_days)); in YearMonthDayFromDays()
[all …]
Ddate.h78 bool IsLeap(int year) { in IsLeap() argument
79 return year % 4 == 0 && (year % 100 != 0 || year % 400 == 0); in IsLeap()
167 int year, month, day; in EquivalentTime() local
168 YearMonthDayFromDays(days, &year, &month, &day); in EquivalentTime()
169 int new_days = DaysFromYearMonth(EquivalentYear(year), month) + day - 1; in EquivalentTime()
177 int EquivalentYear(int year) { in EquivalentYear() argument
178 int week_day = Weekday(DaysFromYearMonth(year, 0)); in EquivalentYear()
179 int recent_year = (IsLeap(year) ? 1956 : 1967) + (week_day * 12) % 28; in EquivalentYear()
187 void YearMonthDayFromDays(int days, int* year, int* month, int* day);
191 int DaysFromYearMonth(int year, int month);
/external/icu/icu4c/source/i18n/
Djapancal.cpp36 int16_t year; member
333 if(eyear == kEraInfo[era].year) { in getDefaultMonthInYear()
346 if(eyear == kEraInfo[era].year) { in getDefaultDayInMonth()
365 int32_t year; in handleGetExtendedYear() local
369 year = internalGet(UCAL_EXTENDED_YEAR, kGregorianEpoch); in handleGetExtendedYear()
372 year = internalGet(UCAL_YEAR) + kEraInfo[internalGetEra()].year - 1; in handleGetExtendedYear()
374 return year; in handleGetExtendedYear()
382 int32_t year = internalGet(UCAL_EXTENDED_YEAR); // Gregorian year in handleComputeFields() local
391 fprintf(stderr, "== %d \n", year); in handleComputeFields()
394 if (year > kEraInfo[kCurrentEra].year) { in handleComputeFields()
[all …]
Dhebrwcal.cpp225 int32_t year = get(UCAL_YEAR, status); in add() local
231 if (acrossAdar1 && month>=ADAR_1 && !isLeapYear(year)) { in add()
238 ++year; in add()
245 if (acrossAdar1 && month<=ADAR_1 && !isLeapYear(year)) { in add()
252 --year; in add()
257 set(UCAL_YEAR, year); in add()
317 int32_t year = get(UCAL_YEAR, status); in roll() local
319 UBool leapYear = isLeapYear(year); in roll()
320 int32_t yearLength = monthsInYear(year); in roll()
387 int32_t HebrewCalendar::startOfYear(int32_t year, UErrorCode &status) in startOfYear() argument
[all …]
Dislamcal.cpp359 UBool IslamicCalendar::civilLeapYear(int32_t year) in civilLeapYear() argument
361 return (14 + 11 * year) % 30 < 11; in civilLeapYear()
368 int32_t IslamicCalendar::yearStart(int32_t year) const{ in yearStart()
370 (cType == UMALQURA && (year < UMALQURA_YEAR_START || year > UMALQURA_YEAR_END))) in yearStart()
372 return (year-1)*354 + ClockMath::floorDivide((3+11*year),30); in yearStart()
374 return trueMonthStart(12*(year-1)); in yearStart()
376 year -= UMALQURA_YEAR_START; in yearStart()
378 int32_t yrStartLinearEstimate = (int32_t)((354.36720 * (double)year) + 460322.05 + 0.5); in yearStart()
380 return yrStartLinearEstimate + umAlQuraYrStartEstimateFix[year]; in yearStart()
391 int32_t IslamicCalendar::monthStart(int32_t year, int32_t month) const { in monthStart() argument
[all …]
Dindiancal.cpp95 static UBool isGregorianLeap(int32_t year) in isGregorianLeap() argument
97 return ((year % 4) == 0) && (!(((year % 100) == 0) && ((year % 400) != 0))); in isGregorianLeap()
141 static double gregorianToJD(int32_t year, int32_t month, int32_t date) { in gregorianToJD() argument
143 (365 * (year - 1)) + in gregorianToJD()
144 uprv_floor((year - 1) / 4) + in gregorianToJD()
145 (-uprv_floor((year - 1) / 100)) + in gregorianToJD()
146 uprv_floor((year - 1) / 400) + in gregorianToJD()
149 (isGregorianLeap(year) ? -1 : -2) in gregorianToJD()
162 int32_t year, month, day; in jdToGregorian() local
172 year = (int32_t)((quadricent * 400) + (cent * 100) + (quad * 4) + yindex); in jdToGregorian()
[all …]
Dpersncal.cpp108 UBool PersianCalendar::isLeapYear(int32_t year) in isLeapYear() argument
111 ClockMath::floorDivide(25 * year + 11, 33, remainder); in isLeapYear()
119 int32_t PersianCalendar::yearStart(int32_t year) { in yearStart() argument
120 return handleComputeMonthStart(year,0,FALSE); in yearStart()
130 int32_t PersianCalendar::monthStart(int32_t year, int32_t month) const { in monthStart() argument
131 return handleComputeMonthStart(year,month,TRUE); in monthStart()
187 int32_t year; in handleGetExtendedYear() local
189 year = internalGet(UCAL_EXTENDED_YEAR, 1); // Default to year 1 in handleGetExtendedYear()
191 year = internalGet(UCAL_YEAR, 1); // Default to year 1 in handleGetExtendedYear()
193 return year; in handleGetExtendedYear()
[all …]
Dgregoimp.h142 static inline UBool isLeapYear(int32_t year);
150 static inline int8_t monthLength(int32_t year, int32_t month);
168 static double fieldsToDay(int32_t year, int32_t month, int32_t dom);
180 static void dayToFields(double day, int32_t& year, int32_t& month,
192 static inline void dayToFields(double day, int32_t& year, int32_t& month,
206 static void timeToFields(UDate time, int32_t& year, int32_t& month,
224 static int32_t dayOfWeekInMonth(int32_t year, int32_t month, int32_t dom);
258 inline UBool Grego::isLeapYear(int32_t year) { in isLeapYear() argument
260 return ((year&0x3) == 0) && ((year%100 != 0) || (year%400 == 0)); in isLeapYear()
264 Grego::monthLength(int32_t year, int32_t month) { in monthLength() argument
[all …]
Dtaiwncal.cpp68 int32_t year = kGregorianEpoch; in handleGetExtendedYear() local
72 year = internalGet(UCAL_EXTENDED_YEAR, kGregorianEpoch); in handleGetExtendedYear()
76 year = internalGet(UCAL_YEAR, 1) + kTaiwanEraStart; in handleGetExtendedYear()
78 year = 1 - internalGet(UCAL_YEAR, 1) + kTaiwanEraStart; in handleGetExtendedYear()
81 return year; in handleGetExtendedYear()
116 int32_t year = internalGet(UCAL_YEAR);
119 year = 1-year;
127 year = year - kTaiwanEraStart;
130 internalSet(UCAL_YEAR, year);
/external/lzma/CPP/Windows/
DTime.cpp58 unsigned year, mon, day, hour, min, sec; in FileTimeToDosTime()
74 year = (unsigned)(kFileTimeStartYear + v / PERIOD_400 * 400); in FileTimeToDosTime()
80 year += temp * 100; in FileTimeToDosTime()
86 year += temp * 4; in FileTimeToDosTime()
92 year += temp; in FileTimeToDosTime()
95 if (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)) in FileTimeToDosTime()
107 if (year < kDosTimeStartYear) in FileTimeToDosTime()
109 year -= kDosTimeStartYear; in FileTimeToDosTime()
111 if (year >= 128) in FileTimeToDosTime()
113 dosTime = (year << 25) | (mon << 21) | (day << 16) | (hour << 11) | (min << 5) | (sec >> 1); in FileTimeToDosTime()
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/
DGrego.java60 public static final boolean isLeapYear(int year) { in isLeapYear() argument
62 return ((year&0x3) == 0) && ((year%100 != 0) || (year%400 == 0)); in isLeapYear()
71 public static final int monthLength(int year, int month) { in monthLength() argument
72 return MONTH_LENGTH[month + (isLeapYear(year) ? 12 : 0)]; in monthLength()
81 public static final int previousMonthLength(int year, int month) { in previousMonthLength() argument
82 return (month > 0) ? monthLength(year, month-1) : 31; in previousMonthLength()
93 public static long fieldsToDay(int year, int month, int dom) { in fieldsToDay() argument
94 int y = year - 1; in fieldsToDay()
98 DAYS_BEFORE[month + (isLeapYear(year) ? 12 : 0)] + dom; // => month/dom in fieldsToDay()
128 int year = (int)(400 * n400 + 100 * n100 + 4 * n4 + n1); in dayToFields() local
[all …]
/external/v8/test/cctest/
Dtest-date.cc39 int year, start_month, start_day, end_month, end_day, offset_sec; member
49 int year, month, day; in GetDaylightSavingsOffsetFromOS() local
50 YearMonthDayFromDays(days, &year, &month, &day); in GetDaylightSavingsOffsetFromOS()
51 Rule* rule = FindRuleFor(year, month, day, time_in_day_sec); in GetDaylightSavingsOffsetFromOS()
61 Rule* FindRuleFor(int year, int month, int day, int time_in_day_sec) { in FindRuleFor() argument
64 if (Match(&rules_[i], year, month, day, time_in_day_sec)) { in FindRuleFor()
71 bool Match(Rule* rule, int year, int month, int day, int time_in_day_sec) { in Match() argument
72 if (rule->year != 0 && rule->year != year) return false; in Match()
75 int start_day = ComputeRuleDay(year, rule->start_month, rule->start_day); in Match()
80 int end_day = ComputeRuleDay(year, rule->end_month, rule->end_day); in Match()
[all …]
/external/icu/icu4c/source/data/rbnf/
Den.txt45 "%%2d-year:",
49 "%spellout-numbering-year:",
53 "1010/100: << >%%2d-year>;",
54 "1100/100: << >%%2d-year>;",
56 "2010/100: << >%%2d-year>;",
57 "2100/100: << >%%2d-year>;",
59 "3010/100: << >%%2d-year>;",
60 "3100/100: << >%%2d-year>;",
62 "4010/100: << >%%2d-year>;",
63 "4100/100: << >%%2d-year>;",
[all …]
/external/toybox/toys/posix/
Ddate.c69 unsigned year, r1 = tm->tm_year % 100, r2 = (tm->tm_year + 50) % 100, local
73 sscanf(str, "%u%n", &year, &len);
74 if (len == 4) year -= 1900;
81 if ((r1 < r2) ? (r1 < year && year < r2) : (year < r1 || year > r2)) {
82 if (year < r1) year += 100;
83 } else if (year > r1) year -= 100;
84 tm->tm_year = year + century;
/external/apache-http/android/src/android/net/http/
DLegacyHttpDateTime.java90 int year = 1970; in parse() local
97 year = getYear(rfcMatcher.group(3)); in parse()
105 year = getYear(ansicMatcher.group(4)); in parse()
112 if (year >= 2038) { in parse()
113 year = 2038; in parse()
120 month, year); in parse()
183 int year = (yearString.charAt(0) - '0') * 10 in getYear() local
185 if (year >= 70) { in getYear()
186 return year + 1900; in getYear()
188 return year + 2000; in getYear()
[all …]

12345678910>>...31