@@ -25,26 +25,26 @@ module namespace fd="http://exist-db.org/xquery/test/convert-dates";
25
25
26
26
declare namespace test="http://exist-db.org/xquery/xqsuite" ;
27
27
28
- (: verify that we can convert xs:string to :xs:dateTime :)
28
+ (: verify that we can convert xs:string to :xs:dateTimeStamp :)
29
29
declare
30
30
%test:args("2012-06-26T23:14:22.566+02:00" )
31
31
%test:assertEquals("11:14 pm on Tuesday, June 26th, 2012" )
32
- function fd:format-dateTime ($date as xs:dateTime ) {
32
+ function fd:format-dateTimeStamp ($date as xs:dateTimeStamp ) {
33
33
format-dateTime ($date, "[h00]:[m00] [P] on [FNn], [MNn] [D1o], [Y]" , "en" , (), ())
34
34
};
35
35
36
- (: verify that we can't convert xs:string without timezone to :xs:dateTime :)
36
+ (: verify that we can't convert xs:string without timezone to :xs:dateTimeStamp :)
37
37
declare
38
38
%test:args("2012-06-26T23:14:22.566" )
39
39
%test:assertError
40
- function fd:convert-date-time ($date as xs:dateTime ) {
40
+ function fd:convert-date-time-stamp ($date as xs:dateTimeStamp ) {
41
41
format-dateTime ($date, "[h00]:[m00] [P] on [FNn], [MNn] [D1o], [Y]" , "en" , (), ())
42
42
};
43
43
44
44
declare
45
45
%test:args("2022-05-17T16:24:06.003+02:00" , "PT2H" )
46
46
%test:assertEquals("2022-05-17T18:24:06.003+02:00" )
47
- function fd:add-test ($date as xs:dateTime , $duration as xs:dayTimeDuration) {
47
+ function fd:add-test ($date as xs:dateTimeStamp , $duration as xs:dayTimeDuration) {
48
48
$duration + $date
49
49
};
50
50
@@ -62,44 +62,44 @@ function fd:subtract-from-dateTime-test($date1 as xs:dateTime, $date2 as xs:date
62
62
($date1 - $date2) cast as xs:string
63
63
};
64
64
65
- (: verify that fn:current-dateTime() return type is xs:dateTime :)
65
+ (: verify that fn:current-dateTime() return type is xs:dateTimeStamp :)
66
66
declare
67
67
%test:assertEquals("true" )
68
68
function fd:current-dateTime-type () {
69
- fn:current-dateTime () instance of xs:dateTime
69
+ fn:current-dateTime () instance of xs:dateTimeStamp
70
70
};
71
71
72
72
declare
73
73
%test:args("2022-05-17T16:24:06.003+02:00" , "PT2H" )
74
74
%test:assertEquals("true" )
75
- function fd:return-type-test ($date as xs:dateTime , $duration as xs:dayTimeDuration) {
76
- ($duration + $date) instance of xs:dateTime
75
+ function fd:return-type-test ($date as xs:dateTimeStamp , $duration as xs:dayTimeDuration) {
76
+ ($duration + $date) instance of xs:dateTimeStamp
77
77
};
78
78
79
79
declare
80
- %test:args("not-a-dateTime " )
80
+ %test:args("not-a-dateTimeStamp " )
81
81
%test:assertError
82
- function fd:not-a-dateTime ($date as xs:dateTime ) {
83
- $date instance of xs:dateTime
82
+ function fd:not-a-dateTimeStamp ($date as xs:dateTimeStamp ) {
83
+ $date instance of xs:dateTimeStamp
84
84
};
85
85
86
86
declare
87
87
%test:args("2022-05-17T17:16:00.000" )
88
88
%test:assertError
89
- function fd:not-a-dateTime2 ($date as xs:dateTime ) {
90
- $date instance of xs:dateTime
89
+ function fd:not-a-dateTimeStamp2 ($date as xs:dateTimeStamp ) {
90
+ $date instance of xs:dateTimeStamp
91
91
};
92
92
93
93
declare
94
94
%test:args("2022-05-17T17:16:00.000Z" )
95
95
%test:assertEquals("true" )
96
- function fd:create-dateTime ($date as xs:dateTime ) {
97
- $date instance of xs:dateTime
96
+ function fd:create-dateTimeStamp ($date as xs:dateTimeStamp ) {
97
+ $date instance of xs:dateTimeStamp
98
98
};
99
99
100
100
declare
101
101
%test:args("2022-05-17T17:16:00.000+01:00" )
102
102
%test:assertEquals("true" )
103
- function fd:create-dateTime2 ($date as xs:dateTime ) {
104
- $date instance of xs:dateTime
103
+ function fd:create-dateTimeStamp2 ($date as xs:dateTimeStamp ) {
104
+ $date instance of xs:dateTimeStamp
105
105
};
0 commit comments