File: dateConstruction.qml

package info (click to toggle)
qt6-declarative 6.9.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 308,920 kB
  • sloc: cpp: 775,911; javascript: 514,247; xml: 10,855; python: 2,806; ansic: 2,253; java: 810; sh: 262; makefile: 41; php: 27
file content (20 lines) | stat: -rw-r--r-- 807 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
pragma Strict
import QtQml

QtObject {
    property date now: new Date()
    property date now2: new Date(now)
    property date fromString: new Date("1995-12-17T03:24:00")
    property date fromNumber: new Date(777)
    property date fromPrimitive: new Date(objectName.length === 0 ? 57 : "1997-02-13T13:04:12")
    property date from2: new Date(1996, 1)
    property date from3: new Date(1996, 2, 3)
    property date from4: new Date(1996, 3, 4, 5)
    property date from5: new Date(1996, 4, 5, 6, 7)
    property date from6: new Date(1996, 5, 6, 7, 8, 9)
    property date from7: new Date(1996, 6, 7, 8, 9, 10, 11)
    property date from8: new Date(1996, 7, 8, 9, 10, 11, 12, 13)

    property date withUnderflow: new Date(-4, -5, -6, -7, -8, -9, -10)
    property date invalid: new Date("foo", "bar")
}