Lines Matching defs:month

62   int32_t month;
74 int32_t month;
157 void BalanceISODate(Isolate* isolate, int32_t* year, int32_t* month,
183 Isolate* isolate, int32_t year, int32_t month, int32_t day, int32_t hour,
224 int32_t month, int32_t day,
233 int32_t ISODaysInMonth(Isolate* isolate, int32_t year, int32_t month);
242 bool IsValidISODate(Isolate* isolate, int32_t year, int32_t month, int32_t day);
249 void BalanceISOYearMonth(Isolate* isolate, int32_t* year, int32_t* month);
370 bool ISODateTimeWithinLimits(Isolate* isolate, int32_t year, int32_t month,
378 * Take a short cut and use pre-calculated year/month/day boundary instead.
394 if (month > 8) return true;
395 if (month < 8) return false;
399 if (month > 4) return false;
400 if (month < 4) return true;
403 // 1. Assert: year, month, day, hour, minute, second, millisecond,
405 // 2. Let ns be ! GetEpochFromISOParts(year, month, day, hour, minute,
413 bool ISOYearMonthWithinLimits(int32_t year, int32_t month) {
415 // 1. Assert: year and month are integers.
419 // 3. If year is −271821 and month < 4, then
421 if (year == -271821 && month < 4) return false;
422 // 4. If year is 275760 and month > 9, then
424 if (year == 275760 && month > 9) return false;
1027 int month = 0;
1034 isolate->date_cache()->BreakDownTime(epoch_milliseconds, &year, &month, &day,
1039 // 4. Let month be ! MonthFromTime(epochMilliseconds) + 1.
1040 result.month = month + 1;
1041 DCHECK_GE(result.month, 1);
1042 DCHECK_LE(result.month, 12);
1077 int32_t month, int32_t day,
1083 // 1. Assert: year, month, day, hour, minute, second, millisecond,
1089 // 3. Let balancedDate be ! BalanceISODate(year, month, day +
1092 BalanceISODate(isolate, &year, &month, &day);
1100 month,
1133 result = BalanceISODateTime(isolate, result.year, result.month, result.day,
1142 isolate, result.year, result.month, result.day, result.hour,
1330 isolate, earlier.year, earlier.month, earlier.day, earlier.hour,
1382 isolate, later.year, later.month, later.day, later.hour, later.minute,
1847 // e. Let fieldNames be ? CalendarFields(calendar, « "day", "month",
1884 DCHECK(IsValidISODate(isolate, result.year, result.month, result.day));
1899 return CreateTemporalDate(isolate, result.year, result.month, result.day,
2288 // 6. If month is undefined, then
2290 // a. Set month to 1.
2291 result.month = 1;
2294 // a. Set month to ! ToIntegerOrInfinity(month).
2295 result.month = parsed.date_month;
2340 // 16. If ! IsValidISODate(year, month, day) is false, throw a RangeError
2342 if (!IsValidISODate(isolate, result.year, result.month, result.day)) {
2353 // 18. Return the Record { [[Year]]: year, [[Month]]: month, [[Day]]: day,
2399 DateRecord ret = {result.year, result.month, result.day, result.calendar};
2489 record.month = result.month;
2524 GetEpochFromISOParts(isolate, result.year, result.month, result.day,
2921 // a. If nextKey is not "month" or "monthCode", then
2975 // 6. If newKeys does not contain either "month" or "monthCode", then
2977 // a. Let month be ? Get(fields, "month").
2978 Handle<Object> month;
2979 ASSIGN_RETURN_ON_EXCEPTION(isolate, month,
2983 // b. If month is not undefined, then
2984 if (!month->IsUndefined()) {
2985 // i. Perform ! CreateDataPropertyOrThrow(merged, "month", month).
2987 factory->month_string(), month,
3135 CALENDAR_ABSTRACT_OPERATION_INT_ACTION(Month, month, ToPositiveInteger)
3422 // 2. If either u1 or u2 is "month", return "month".
3472 void BalanceISODate(Isolate* isolate, int32_t* year, int32_t* month,
3476 // 1. Assert: year, month, and day are integers.
3477 // 2. Let balancedYearMonth be ! BalanceISOYearMonth(year, month).
3478 // 3. Set month to balancedYearMonth.[[Month]].
3480 BalanceISOYearMonth(isolate, year, month);
3484 // 6. If month > 2, then
3488 int32_t test_year = (*month > 2) ? *year : *year - 1;
3514 // greater than the number of days in the current month, the following section
3518 // a. Set balancedYearMonth to ! BalanceISOYearMonth(year, month − 1).
3520 // c. Set month to balancedYearMonth.[[Month]].
3521 *month -= 1;
3522 BalanceISOYearMonth(isolate, year, month);
3523 // d. Set day to day + ! ISODaysInMonth(year, month).
3524 *day += ISODaysInMonth(isolate, *year, *month);
3527 // the current month, the following section adds months and subtracts days
3528 // until the number of days is less than the number of days in the month.
3529 // 15. Repeat, while day > ! ISODaysInMonth(year, month),
3531 while (*day > (iso_days_in_month = ISODaysInMonth(isolate, *year, *month))) {
3532 // a. Set day to day − ! ISODaysInMonth(year, month).
3534 // b. Set balancedYearMonth to ! BalanceISOYearMonth(year, month + 1).
3536 // d. Set month to balancedYearMonth.[[Month]].
3537 *month += 1;
3538 BalanceISOYearMonth(isolate, year, month);
3540 // 16. Return the new Record { [[Year]]: year, [[Month]]: month, [[Day]]: day
3547 Isolate* isolate, int32_t year, int32_t month, int32_t day, int32_t hour,
3553 // 1. Assert: year, month, day, hour, minute, second, millisecond,
3563 // 3. Let datePart be ? CreateTemporalDate(year, month, day, calendar).
3567 CreateTemporalDate(isolate, year, month, day, calendar),
3591 time_result.month = added_date->iso_month();
3651 // 4. If largestUnit is one of "year", "month", "week", or "day", then
3676 // 10. If largestUnit is "year", "month", "week", "day", or "hour", then
4317 int32_t month, int32_t day,
4323 // 1. Assert: year, month, day, hour, minute, second, millisecond,
4325 // 2. Assert: ! IsValidISODate(year, month, day) is true.
4326 DCHECK(IsValidISODate(isolate, year, month, day));
4331 // 4. Let date be ! MakeDay(?(year), ?(month − 1), ?(day)).
4332 double date = MakeDay(year, month - 1, day);
4427 int32_t ISODaysInMonth(Isolate* isolate, int32_t year, int32_t month) {
4431 // 2. Assert: month is an integer, month ≥ 1, and month ≤ 12.
4432 DCHECK_GE(month, 1);
4433 DCHECK_LE(month, 12);
4434 // 3. If month is 1, 3, 5, 7, 8, 10, or 12, return 31.
4435 if (month % 2 == ((month < 8) ? 1 : 0)) return 31;
4436 // 4. If month is 4, 6, 9, or 11, return 30.
4437 DCHECK(month == 2 || month == 4 || month == 6 || month == 9 || month == 11);
4438 if (month != 2) return 30;
4482 bool IsValidISODate(Isolate* isolate, int32_t year, int32_t month,
4486 // 1. Assert: year, month, and day are integers.
4487 // 2. If month < 1 or month > 12, then
4489 if (month < 1 || month > 12) return false;
4490 // 3. Let daysInMonth be ! ISODaysInMonth(year, month).
4493 if (day < 1 || day > ISODaysInMonth(isolate, year, month)) return false;
4521 void BalanceISOYearMonth(Isolate* isolate, int32_t* year, int32_t* month) {
4524 // 1. Assert: year and month are integers.
4525 // 2. Set year to year + floor((month - 1) / 12).
4526 *year += floor_divide((*month - 1), 12);
4527 // 3. Set month to (month − 1) modulo 12 + 1.
4528 *month = static_cast<int32_t>(modulo(*month - 1, 12)) + 1;
4530 // 4. Return the new Record { [[Year]]: year, [[Month]]: month }.
4924 int32_t ToISODayOfYear(Isolate* isolate, int32_t year, int32_t month,
4929 // 2. Assert: month is an integer.
4931 // 4. Let date be the date given by year, month, and day.
4933 // Note: In ISO 8601, Jan: month=1, Dec: month=12,
4934 // In DateCache API, Jan: month=0, Dec: month=11 so we need to - 1 for month.
4935 return day + isolate->date_cache()->DaysFromYearMonth(year, month - 1) -
4947 int32_t ToISODayOfWeek(Isolate* isolate, int32_t year, int32_t month,
4952 // 2. Assert: month is an integer.
4954 // 4. Let date be the date given by year, month, and day.
4956 // Note: In ISO 8601, Jan: month=1, Dec: month=12.
4957 // In DateCache API, Jan: month=0, Dec: month=11 so we need to - 1 for month.
4963 isolate->date_cache()->DaysFromYearMonth(year, month - 1) + day - 1);
4971 int32_t year, int32_t* month, int32_t* day) {
4974 // 1. Assert: year, month, and day are integers.
4979 // a. If ! IsValidISODate(year, month, day) is false, throw a RangeError
4981 if (!IsValidISODate(isolate, year, *month, *day)) {
4985 // b. Return the Record { [[Year]]: year, [[Month]]: month, [[Day]]: day
4990 // a. Set month to ! ConstrainToRange(month, 1, 12).
4991 *month = std::max(std::min(*month, 12), 1);
4993 // month)).
4994 *day = std::max(std::min(*day, ISODaysInMonth(isolate, year, *month)), 1);
4995 // c. Return the Record { [[Year]]: year, [[Month]]: month, [[Day]]: day
5004 // 1. Let month be ? Get(fields, "month").
5019 // a. If month is undefined, throw a TypeError exception.
5024 // b. Return month.
5025 // Note: In Temporal spec, "month" in fields is always converted by
5062 // 10. If month is not undefined, and month ≠ numberPart, then
5065 // Note: In Temporal spec, "month" in fields is always converted by
5086 int32_t* month, int32_t* day) {
5094 // 3. Set fields to ? PrepareTemporalFields(fields, « "day", "month",
5124 // 6. Let month be ? ResolveISOMonth(fields).
5127 *month = maybe_month.FromJust();
5145 // 9. Return ? RegulateISODate(year, month, day, overflow).
5146 return RegulateISODate(isolate, maybe_overflow.FromJust(), *year, month, day);
5213 int32_t month;
5216 month = Handle<JSTemporalPlainDate>::cast(temporal_date_like)->iso_month();
5220 month =
5226 month =
5229 return handle(Smi::FromInt(ISODaysInMonth(isolate, year, month)), isolate);
5428 int32_t month;
5432 isolate, fields, options, method_name, &year, &month, &day);
5437 return CreateTemporalDate(isolate, year, month, day, calendar);