File: S15.9.3.1_A5_T4.js

package info (click to toggle)
qtdeclarative-opensource-src-gles 5.15.17%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 258,992 kB
  • sloc: javascript: 512,415; cpp: 497,385; xml: 8,892; python: 3,304; ansic: 2,764; sh: 206; makefile: 46; php: 27
file content (42 lines) | stat: -rw-r--r-- 1,618 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: |
    The [[Value]] property of the newly constructed object
    is set by following steps:
    8. If Result(1) is not NaN and 0 <= ToInteger(Result(1)) <= 99, Result(8) is
    1900+ToInteger(Result(1)); otherwise, Result(8) is Result(1)
    9. Compute MakeDay(Result(8), Result(2), Result(3))
    10. Compute MakeTime(Result(4), Result(5), Result(6), Result(7))
    11. Compute MakeDate(Result(9), Result(10))
    12. Set the [[Value]] property of the newly constructed object to
    TimeClip(UTC(Result(11)))
esid: sec-date-year-month-date-hours-minutes-seconds-ms
es5id: 15.9.3.1_A5_T4
description: 5 arguments, (year, month, date, hours, minutes)
includes: [assertRelativeDateMs.js]
---*/

assertRelativeDateMs(new Date(1899, 11, 31, 23, 59), -2208988860000);

assertRelativeDateMs(new Date(1899, 12, 1, 0, 0), -2208988800000);

assertRelativeDateMs(new Date(1900, 0, 1, 0, 0), -2208988800000);

assertRelativeDateMs(new Date(1969, 11, 31, 23, 59), -60000);

assertRelativeDateMs(new Date(1969, 12, 1, 0, 0), 0);

assertRelativeDateMs(new Date(1970, 0, 1, 0, 0), 0);

assertRelativeDateMs(new Date(1999, 11, 31, 23, 59), 946684740000);

assertRelativeDateMs(new Date(1999, 12, 1, 0, 0), 946684800000);

assertRelativeDateMs(new Date(2000, 0, 1, 0, 0), 946684800000);

assertRelativeDateMs(new Date(2099, 11, 31, 23, 59), 4102444740000);

assertRelativeDateMs(new Date(2099, 12, 1, 0, 0), 4102444800000);

assertRelativeDateMs(new Date(2100, 0, 1, 0, 0), 4102444800000);