image Strona poczÂątkowa       image Ecma 262       image balladyna_2       image chili600       image Zenczak 2       image Hobbit       

Podstrony

[ Pobierz całość w formacie PDF ]

readable form.
15.9.5.4 Date.prototype.toTimeString ( )
This function returns a string value. The contents of the string are implementation-dependent, but are
intended to represent the  time portion of the Date in the current time zone in a convenient, human-
readable form.
15.9.5.5 Date.prototype.toLocaleString ( )
This function returns a string value. The contents of the string are implementation-dependent, but are
intended to represent the Date in the current time zone in a convenient, human-readable form that
corresponds to the conventions of the host environment s current locale.
NOTE
The first parameter to this function is likely to be used in a future version of this standard; it is
recommended that implementations do not use this parameter position for anything else.
15.9.5.6 Date.prototype.toLocaleDateString ( )
This function returns a string value. The contents of the string are implementation-dependent, but are
intended to represent the  date portion of the Date in the current time zone in a convenient, human-
readable form that corresponds to the conventions of the host environment s current locale.
NOTE
The first parameter to this function is likely to be used in a future version of this standard; it is
recommended that implementations do not use this parameter position for anything else.
15.9.5.7 Date.prototype.toLocaleTimeString ( )
This function returns a string value. The contents of the string are implementation-dependent, but are
intended to represent the  time portion of the Date in the current time zone in a convenient, human-
readable form that corresponds to the conventions of the host environment s current locale.
NOTE
The first parameter to this function is likely to be used in a future version of this standard; it is
recommended that implementations do not use this parameter position for anything else.
15.9.5.8 Date.prototype.valueOf ( )
ThevalueOffunction returns a number, which is this time value.
15.9.5.9 Date.prototype.getTime ( )
1. If the this value is not an object whose [[Class]] property is"Date", throw a TypeError
exception.
2. Return this time value.
15.9.5.10 Date.prototype.getFullYear ( )
1. Let t be this time value.
2. If t is NaN, return NaN.
3. Return YearFromTime(LocalTime(t)).
15.9.5.11 Date.prototype.getUTCFullYear ( )
1. Let t be this time value.
2. If t is NaN, return NaN.
3. Return YearFromTime(t).
15.9.5.12 Date.prototype.getMonth ( )
1. Let t be this time value.
2. If t is NaN, return NaN.
3. Return MonthFromTime(LocalTime(t)).
- 125 -
15.9.5.13 Date.prototype.getUTCMonth ( )
1. Let t be this time value.
2. If t is NaN, return NaN.
3. Return MonthFromTime(t).
15.9.5.14 Date.prototype.getDate ( )
1. Let t be this time value.
2. If t is NaN, return NaN.
3. Return DateFromTime(LocalTime(t)).
15.9.5.15 Date.prototype.getUTCDate ( )
1. Let t be this time value.
2. If t is NaN, return NaN.
3. Return DateFromTime(t).
15.9.5.16 Date.prototype.getDay ( )
1. Let t be this time value.
2. If t is NaN, return NaN.
3. Return WeekDay(LocalTime(t)).
15.9.5.17 Date.prototype.getUTCDay ( )
1. Let t be this time value.
2. If t is NaN, return NaN.
3. Return WeekDay(t).
15.9.5.18 Date.prototype.getHours ( )
1. Let t be this time value.
2. If t is NaN, return NaN.
3. Return HourFromTime(LocalTime(t)).
15.9.5.19 Date.prototype.getUTCHours ( )
1. Let t be this time value.
2. If t is NaN, return NaN.
3. Return HourFromTime(t).
15.9.5.20 Date.prototype.getMinutes ( )
1. Let t be this time value.
2. If t is NaN, return NaN.
3. Return MinFromTime(LocalTime(t)).
15.9.5.21 Date.prototype.getUTCMinutes ( )
1. Let t be this time value.
2. If t is NaN, return NaN.
3. Return MinFromTime(t).
15.9.5.22 Date.prototype.getSeconds ( )
1. Let t be this time value.
2. If t is NaN, return NaN.
3. Return SecFromTime(LocalTime(t)).
15.9.5.23 Date.prototype.getUTCSeconds ( )
1. Let t be this time value.
2. If t is NaN, return NaN.
3. Return SecFromTime(t).
- 126 -
15.9.5.24 Date.prototype.getMilliseconds ( )
1. Let t be this time value.
2. If t is NaN, return NaN.
3. Return msFromTime(LocalTime(t)).
15.9.5.25 Date.prototype.getUTCMilliseconds ( )
1. Let t be this time value.
2. If t is NaN, return NaN.
3. Return msFromTime(t).
15.9.5.26 Date.prototype.getTimezoneOffset ( )
Returns the difference between local time and UTC time in minutes.
1. Let t be this time value.
2. If t is NaN, return NaN.
3. Return (t - LocalTime(t)) / msPerMinute.
15.9.5.27 Date.prototype.setTime (time)
1. If the this value is not a Date object, throw a TypeError exception.
2. Call ToNumber(time).
3. Call TimeClip(Result(1)).
4. Set the [[Value]] property of the this value to Result(2).
5. Return the value of the [[Value]] property of the this value.
15.9.5.28 Date.prototype.setMilliseconds (ms)
1. Let t be the result of LocalTime(this time value).
2. Call ToNumber(ms).
3. Compute MakeTime(HourFromTime(t), MinFromTime(t), SecFromTime(t), Result(2)).
4. Compute UTC(MakeDate(Day(t), Result(3))).
5. Set the [[Value]] property of the this value to TimeClip(Result(4)).
6. Return the value of the [[Value]] property of the this value.
15.9.5.29 Date.prototype.setUTCMilliseconds (ms)
1. Let t be this time value.
2. Call ToNumber(ms).
3. Compute MakeTime(HourFromTime(t), MinFromTime(t), SecFromTime(t), Result(2)).
4. Compute MakeDate(Day(t), Result(3)).
5. Set the [[Value]] property of the this value to TimeClip(Result(4)).
6. Return the value of the [[Value]] property of the this value.
15.9.5.30 Date.prototype.setSeconds (sec [, ms ] )
If ms is not specified, this behaves as if ms were specified with the value getMilliseconds( ).
1. Let t be the result of LocalTime(this time value).
2. Call ToNumber(sec).
3. If ms is not specified, compute msFromTime(t); otherwise, call ToNumber(ms).
4. Compute MakeTime(HourFromTime(t), MinFromTime(t), Result(2), Result(3)).
5. Compute UTC(MakeDate(Day(t), Result(4))).
6. Set the [[Value]] property of the this value to TimeClip(Result(5)).
7. Return the value of the [[Value]] property of the this value.
Thelengthproperty of thesetSecondsmethod is 2.
15.9.5.31 Date.prototype.setUTCSeconds (sec [, ms ] )
If ms is not specified, this behaves as if ms were specified with the value getUTCMilliseconds( ).
1. Let t be this time value.
2. Call ToNumber(sec).
- 127 -
3. If ms is not specified, compute msFromTime(t); otherwise, call ToNumber(ms).
4. Compute MakeTime(HourFromTime(t), MinFromTime(t), Result(2), Result(3)).
5. Compute MakeDate(Day(t), Result(4)).
6. Set the [[Value]] property of the this value to TimeClip(Result(5)).
7. Return the value of the [[Value]] property of the this value.
Thelengthproperty of thesetUTCSecondsmethod is 2.
15.9.5.33 Date.prototype.setMinutes (min [, sec [, ms ] ] )
If sec is not specified, this behaves as if sec were specified with the value getSeconds( ).
If ms is not specified, this behaves as if ms were specified with the value getMilliseconds( ).
1. Let t be the result of LocalTime(this time value).
2. Call ToNumber(min).
3. If sec is not specified, compute SecFromTime(t); otherwise, call ToNumber(sec).
4. If ms is not specified, compute msFromTime(t); otherwise, call ToNumber(ms).
5. Compute MakeTime(HourFromTime(t), Result(2), Result(3), Result(4)).
6. Compute UTC(MakeDate(Day(t), Result(5))).
7. Set the [[Value]] property of the this value to TimeClip(Result(6)).
8. Return the value of the [[Value]] property of the this value.
Thelengthproperty of thesetMinutesmethod is 3. [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • kskarol.keep.pl