racket/date: fix 'iso-8601 formatting

Closes PR 13372
This commit is contained in:
Matthew Flatt 2012-12-18 06:28:40 -07:00
parent 0f909af765
commit d88e26d7a1
3 changed files with 3 additions and 2 deletions

View File

@ -131,7 +131,7 @@
[(iso-8601) [(iso-8601)
(values (values
(list year "-" (add-zero (date-month date)) "-" (add-zero (date-day date))) (list year "-" (add-zero (date-month date)) "-" (add-zero (date-day date)))
(list " " hour24 ":" minute ":" second))] (list "T" hour24 ":" minute ":" second))]
[(rfc2822) [(rfc2822)
(values (values
(list (substring week-day 0 3) ", " day " " (substring month 0 3) " " year) (list (substring week-day 0 3) ", " day " " (substring month 0 3) " " year)

View File

@ -56,7 +56,7 @@
(test-string 'irish #f "Thursday, 4th May 2006") (test-string 'irish #f "Thursday, 4th May 2006")
(test-string 'irish #t "Thursday, 4th May 2006, 3:02am") (test-string 'irish #t "Thursday, 4th May 2006, 3:02am")
(test-string 'iso-8601 #f "2006-05-04") (test-string 'iso-8601 #f "2006-05-04")
(test-string 'iso-8601 #t "2006-05-04 03:02:01") (test-string 'iso-8601 #t "2006-05-04T03:02:01")
(test-string 'rfc2822 #f "Thu, 4 May 2006") (test-string 'rfc2822 #f "Thu, 4 May 2006")
(test-string 'rfc2822 #t "Thu, 4 May 2006 03:02:01 -0600") (test-string 'rfc2822 #t "Thu, 4 May 2006 03:02:01 -0600")
(test-string 'julian #f "JD 2 453 860") (test-string 'julian #f "JD 2 453 860")

View File

@ -7,6 +7,7 @@ racket/serialize: fxvectors and flvectors are serializable
racket/net: added uri-path-segment-unreserved-encode racket/net: added uri-path-segment-unreserved-encode
racket/url: added current-url-encode-mode racket/url: added current-url-encode-mode
ffi/com: added com-get-property* ffi/com: added com-get-property*
racket/date: fixed 'iso-8601 date formatting
Version 5.3.1.8 Version 5.3.1.8
file/untar: added file/untar: added