File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,12 @@ to-date: function/with [
64
64
copy time: to sp sp
65
65
[copy zone: [plus-minus 4 numeric] | no-case "GMT" (zone: "+0" )]
66
66
to end ; ignore the rest (like comments in mime fields)!
67
+ |
68
+ copy day: 1 2 numeric #"-"
69
+ copy month: 1 2 numeric #"-"
70
+ copy year: 1 4 numeric sp
71
+ copy time: [1 2 numeric #":" 1 2 numeric opt [#":" 1 2 numeric]]
72
+ to end
67
73
]
68
74
][
69
75
value: to string! rejoin [day "-" month "-" year "/" time any [zone "" ]]
Original file line number Diff line number Diff line change @@ -328,7 +328,10 @@ Rebol [
328
328
--assert 4-Apr-2019/19:41:46 = to-date "Thu, 04 Apr 2019 19:41:46 GMT"
329
329
--assert 1-Apr-2019/21:50:04 = to-date "Mon, 1 Apr 2019 21:50:04 GMT"
330
330
--assert 30-Jul-2013/2:17:58-7:00 = to-date "Tue, 30 Jul 2013 02:17:58 -0700 (PDT)"
331
-
331
+ --test-- "TO-DATE {1-1-2000 00:00:00}"
332
+ ;@@ https://github.com/Oldes/Rebol-issues/issues/1362
333
+ --assert 1-Jan-2000/0:00 == to-date "1-1-2000 00:00:00"
334
+ --assert 1-Jan-2000/0:00 == to-date "1-1-2000 00:00"
332
335
333
336
===end-group===
334
337
You can’t perform that action at this time.
0 commit comments