• Home
  • Raw
  • Download

Lines Matching full:date

18 // ES6 section 20.3 Date Objects
44 // ES6 section 20.3.1.13 MakeDay (year, month, date)
45 double MakeDay(double year, double month, double date) { in MakeDay() argument
47 (kMinMonth <= month && month <= kMaxMonth) && std::isfinite(date)) { in MakeDay()
83 return static_cast<double>(day_from_year - 1) + date; in MakeDay()
114 // ES6 section 20.3.1.16 Date Time String Format
134 double date = MakeDate(day, time); in ParseDateTimeString() local
136 if (!std::isnan(date)) { in ParseDateTimeString()
137 date = isolate->date_cache()->ToUTC(static_cast<int64_t>(date)); in ParseDateTimeString()
140 date -= tmp->get(7)->Number() * 1000.0; in ParseDateTimeString()
142 return date; in ParseDateTimeString()
151 SNPrintF(str, "Invalid Date"); in ToDateString()
183 Object* SetLocalDateValue(Handle<JSDate> date, double time_val) { in SetLocalDateValue() argument
186 Isolate* const isolate = date->GetIsolate(); in SetLocalDateValue()
191 return *JSDate::SetValue(date, TimeClip(time_val)); in SetLocalDateValue()
196 // ES6 section 20.3.2 The Date Constructor for the [[Call]] case.
206 // ES6 section 20.3.2 The Date Constructor for the [[Construct]] case.
239 double date = 1.0, hours = 0.0, minutes = 0.0, seconds = 0.0, ms = 0.0; in BUILTIN() local
244 date = date_object->Number(); in BUILTIN()
274 double const day = MakeDay(year, month, date); in BUILTIN()
287 // ES6 section 20.3.3.1 Date.now ( )
293 // ES6 section 20.3.3.2 Date.parse ( string )
303 // ES6 section 20.3.3.4 Date.UTC (year,month,date,hours,minutes,seconds,ms)
308 double month = 0.0, date = 1.0, hours = 0.0, minutes = 0.0, seconds = 0.0, in BUILTIN() local
324 date = date_object->Number(); in BUILTIN()
356 double const day = MakeDay(year, month, date); in BUILTIN()
361 // ES6 section 20.3.4.20 Date.prototype.setDate ( date )
364 CHECK_RECEIVER(JSDate, date, "Date.prototype.setDate"); in BUILTIN()
367 double time_val = date->value()->Number(); in BUILTIN()
377 return SetLocalDateValue(date, time_val); in BUILTIN()
380 // ES6 section 20.3.4.21 Date.prototype.setFullYear (year, month, date)
383 CHECK_RECEIVER(JSDate, date, "Date.prototype.setFullYear"); in BUILTIN()
389 if (!std::isnan(date->value()->Number())) { in BUILTIN()
390 int64_t const time_ms = static_cast<int64_t>(date->value()->Number()); in BUILTIN()
404 Handle<Object> date = args.at(3); in BUILTIN() local
405 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, date, Object::ToNumber(date)); in BUILTIN()
406 dt = date->Number(); in BUILTIN()
410 return SetLocalDateValue(date, time_val); in BUILTIN()
413 // ES6 section 20.3.4.22 Date.prototype.setHours(hour, min, sec, ms)
416 CHECK_RECEIVER(JSDate, date, "Date.prototype.setHours"); in BUILTIN()
421 double time_val = date->value()->Number(); in BUILTIN()
447 return SetLocalDateValue(date, time_val); in BUILTIN()
450 // ES6 section 20.3.4.23 Date.prototype.setMilliseconds(ms)
453 CHECK_RECEIVER(JSDate, date, "Date.prototype.setMilliseconds"); in BUILTIN()
456 double time_val = date->value()->Number(); in BUILTIN()
467 return SetLocalDateValue(date, time_val); in BUILTIN()
470 // ES6 section 20.3.4.24 Date.prototype.setMinutes ( min, sec, ms )
473 CHECK_RECEIVER(JSDate, date, "Date.prototype.setMinutes"); in BUILTIN()
477 double time_val = date->value()->Number(); in BUILTIN()
499 return SetLocalDateValue(date, time_val); in BUILTIN()
502 // ES6 section 20.3.4.25 Date.prototype.setMonth ( month, date )
505 CHECK_RECEIVER(JSDate, date, "Date.prototype.setMonth"); in BUILTIN()
509 double time_val = date->value()->Number(); in BUILTIN()
520 Handle<Object> date = args.at(2); in BUILTIN() local
521 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, date, Object::ToNumber(date)); in BUILTIN()
522 dt = date->Number(); in BUILTIN()
526 return SetLocalDateValue(date, time_val); in BUILTIN()
529 // ES6 section 20.3.4.26 Date.prototype.setSeconds ( sec, ms )
532 CHECK_RECEIVER(JSDate, date, "Date.prototype.setSeconds"); in BUILTIN()
536 double time_val = date->value()->Number(); in BUILTIN()
553 return SetLocalDateValue(date, time_val); in BUILTIN()
556 // ES6 section 20.3.4.27 Date.prototype.setTime ( time )
559 CHECK_RECEIVER(JSDate, date, "Date.prototype.setTime"); in BUILTIN()
562 return *JSDate::SetValue(date, TimeClip(value->Number())); in BUILTIN()
565 // ES6 section 20.3.4.28 Date.prototype.setUTCDate ( date )
568 CHECK_RECEIVER(JSDate, date, "Date.prototype.setUTCDate"); in BUILTIN()
571 if (std::isnan(date->value()->Number())) return date->value(); in BUILTIN()
572 int64_t const time_ms = static_cast<int64_t>(date->value()->Number()); in BUILTIN()
579 return *JSDate::SetValue(date, TimeClip(time_val)); in BUILTIN()
582 // ES6 section 20.3.4.29 Date.prototype.setUTCFullYear (year, month, date)
585 CHECK_RECEIVER(JSDate, date, "Date.prototype.setUTCFullYear"); in BUILTIN()
591 if (!std::isnan(date->value()->Number())) { in BUILTIN()
592 int64_t const time_ms = static_cast<int64_t>(date->value()->Number()); in BUILTIN()
605 Handle<Object> date = args.at(3); in BUILTIN() local
606 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, date, Object::ToNumber(date)); in BUILTIN()
607 dt = date->Number(); in BUILTIN()
611 return *JSDate::SetValue(date, TimeClip(time_val)); in BUILTIN()
614 // ES6 section 20.3.4.30 Date.prototype.setUTCHours(hour, min, sec, ms)
617 CHECK_RECEIVER(JSDate, date, "Date.prototype.setUTCHours"); in BUILTIN()
622 double time_val = date->value()->Number(); in BUILTIN()
647 return *JSDate::SetValue(date, TimeClip(time_val)); in BUILTIN()
650 // ES6 section 20.3.4.31 Date.prototype.setUTCMilliseconds(ms)
653 CHECK_RECEIVER(JSDate, date, "Date.prototype.setUTCMilliseconds"); in BUILTIN()
656 double time_val = date->value()->Number(); in BUILTIN()
666 return *JSDate::SetValue(date, TimeClip(time_val)); in BUILTIN()
669 // ES6 section 20.3.4.32 Date.prototype.setUTCMinutes ( min, sec, ms )
672 CHECK_RECEIVER(JSDate, date, "Date.prototype.setUTCMinutes"); in BUILTIN()
676 double time_val = date->value()->Number(); in BUILTIN()
697 return *JSDate::SetValue(date, TimeClip(time_val)); in BUILTIN()
700 // ES6 section 20.3.4.31 Date.prototype.setUTCMonth ( month, date )
703 CHECK_RECEIVER(JSDate, date, "Date.prototype.setUTCMonth"); in BUILTIN()
707 double time_val = date->value()->Number(); in BUILTIN()
717 Handle<Object> date = args.at(2); in BUILTIN() local
718 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, date, Object::ToNumber(date)); in BUILTIN()
719 dt = date->Number(); in BUILTIN()
723 return *JSDate::SetValue(date, TimeClip(time_val)); in BUILTIN()
726 // ES6 section 20.3.4.34 Date.prototype.setUTCSeconds ( sec, ms )
729 CHECK_RECEIVER(JSDate, date, "Date.prototype.setUTCSeconds"); in BUILTIN()
733 double time_val = date->value()->Number(); in BUILTIN()
749 return *JSDate::SetValue(date, TimeClip(time_val)); in BUILTIN()
752 // ES6 section 20.3.4.35 Date.prototype.toDateString ( )
755 CHECK_RECEIVER(JSDate, date, "Date.prototype.toDateString"); in BUILTIN()
757 ToDateString(date->value()->Number(), ArrayVector(buffer), in BUILTIN()
763 // ES6 section 20.3.4.36 Date.prototype.toISOString ( )
766 CHECK_RECEIVER(JSDate, date, "Date.prototype.toISOString"); in BUILTIN()
767 double const time_val = date->value()->Number(); in BUILTIN()
790 // ES6 section 20.3.4.41 Date.prototype.toString ( )
793 CHECK_RECEIVER(JSDate, date, "Date.prototype.toString"); in BUILTIN()
795 ToDateString(date->value()->Number(), ArrayVector(buffer), in BUILTIN()
801 // ES6 section 20.3.4.42 Date.prototype.toTimeString ( )
804 CHECK_RECEIVER(JSDate, date, "Date.prototype.toTimeString"); in BUILTIN()
806 ToDateString(date->value()->Number(), ArrayVector(buffer), in BUILTIN()
812 // ES6 section 20.3.4.43 Date.prototype.toUTCString ( )
815 CHECK_RECEIVER(JSDate, date, "Date.prototype.toUTCString"); in BUILTIN()
816 double const time_val = date->value()->Number(); in BUILTIN()
818 return *isolate->factory()->NewStringFromAsciiChecked("Invalid Date"); in BUILTIN()
831 // ES6 section B.2.4.1 Date.prototype.getYear ( )
834 CHECK_RECEIVER(JSDate, date, "Date.prototype.getYear"); in BUILTIN()
835 double time_val = date->value()->Number(); in BUILTIN()
836 if (std::isnan(time_val)) return date->value(); in BUILTIN()
845 // ES6 section B.2.4.2 Date.prototype.setYear ( year )
848 CHECK_RECEIVER(JSDate, date, "Date.prototype.setYear"); in BUILTIN()
856 if (!std::isnan(date->value()->Number())) { in BUILTIN()
857 int64_t const time_ms = static_cast<int64_t>(date->value()->Number()); in BUILTIN()
867 return SetLocalDateValue(date, time_val); in BUILTIN()
870 // ES6 section 20.3.4.37 Date.prototype.toJSON ( key )
917 // Load the specified date field, falling back to the runtime as necessary. in Generate_DatePrototype_GetField()
948 // Raise a TypeError if the receiver is not a date. in Generate_DatePrototype_GetField()
1168 "Date.prototype [ @@toPrimitive ]", TENURED)), in Generate_DatePrototypeToPrimitive()