@@ -43,7 +43,7 @@ public void testRelativeCaseInsensitive() {
4343
4444 @ Test
4545 public void testRelativeOffsetSign () {
46- testValid ("+h " , "2000-01-03T02:01:01.100Z" );
46+ testValid ("+1h " , "2000-01-03T02:01:01.100Z" );
4747 testValid ("-h" , "2000-01-03T00:01:01.100Z" );
4848
4949 testInvalid ("~h" , "The relative date time '~h' is not supported." );
@@ -53,8 +53,8 @@ public void testRelativeOffsetSign() {
5353 public void testRelativeOffsetValue () {
5454 testValid ("+h" , "2000-01-03T02:01:01.100Z" );
5555 testValid ("+0h" , "2000-01-03T01:01:01.100Z" );
56- testValid ("+1h" , "2000-01-03T02:01:01.100Z" );
5756 testValid ("+12h" , "2000-01-03T13:01:01.100Z" );
57+ testValid ("-3d" , "1999-12-31T01:01:01.100Z" );
5858
5959 testInvalid ("+1.1h" , "The relative date time '+1.1h' is not supported." );
6060 }
@@ -107,6 +107,7 @@ public void testRelativeOffsetUnit() {
107107
108108 testInvalid ("+ms" , "The relative date time unit 'ms' is not supported." );
109109 testInvalid ("+1INVALID" , "The relative date time unit 'INVALID' is not supported." );
110+ testInvalid ("+now" , "The relative date time unit 'now' is not supported." );
110111 }
111112
112113 @ Test
@@ -167,6 +168,7 @@ public void testRelativeSnap() {
167168 testInvalid ("@INVALID" , "The relative date time unit 'INVALID' is not supported." );
168169 testInvalid ("@ms" , "The relative date time unit 'ms' is not supported." );
169170 testInvalid ("@w8" , "The relative date time unit 'w8' is not supported." );
171+ testInvalid ("@now" , "The relative date time unit 'now' is not supported." );
170172 }
171173
172174 private void testValid (String relativeDateTimeString , String expectedDateTimeString ) {
0 commit comments