Summary
srfi-19 does not recognise the first item in abbreviation vectors for any language
Metadata
- Id: 94fd060da8561b3a9ab46a4a871b1a8e64e8f7e2
- Trac id: 966
- Type: defect
- Reporter: ckeen
- Owner: kon
- Cc:
- Status: closed
- Component: extensions
- Estimated difficulty:
- Resolution: fixed
- Priority: major
- Milestone: someday
- Version: 4.8.x
- Changetime: 2013-01-19 17:44:15 UTC
- Created: 2013-01-19 17:17:44 UTC
- Keywords: srfi-19, locales, scan-dat
Description
locale-find-string from does not recognise the first elements as hits due to an off-by-1. Therefore "Sun", "Sunday" are not recognized.
However LOCALE-ABRV-MONTHS and LOCALE-LONG months work, since they contain a #f slot at index 0.
I am not sure which form is intended. By the code I guess the #f slot for weekdays is missing, or the fx< test in locale-find-string should read fx<=.
This affects scan-date's ~a format directive.
Example:
#;6> (scan-date "Mon, 12 Jan 2014 03:46:09 +0100" "~a, ~d ~b ~Y ~H:~M:~S ~z")
#,(date 0 9 46 3 12 1 2014 3600 CET #f #f #f #f)
#;7> (scan-date "Sun, 12 Jan 2014 03:46:09 +0100" "~a, ~d ~b ~Y ~H:~M:~S ~z")
Error: (string->date) bad date template - invalid string for indexer: "Sun"
Call history:
srfi-19-io.scm:107: srfi-29#localized-template/default
srfi-19-io.scm:153: loop
srfi-19-io.scm:151: g192
srfi-19-io.scm:107: srfi-29#localized-template/default
srfi-19-io.scm:153: loop
srfi-19-io.scm:151: g192
srfi-19-io.scm:107: srfi-29#localized-template/default
srfi-19-io.scm:153: loop
srfi-19-io.scm:151: g192
srfi-19-io.scm:107: srfi-29#localized-template/default
srfi-19-io.scm:153: loop
srfi-19-io.scm:151: g192
srfi-19-io.scm:107: srfi-29#localized-template/default
srfi-19-io.scm:153: loop
srfi-19-io.scm:550: error-bad-date-template
##sys#string-append <--
Changes and comments
[2013-01-19 17:18:08 UTC] ckeen changed component from unknown to extensions
[2013-01-19 17:19:30 UTC] ckeen changed status from new to assigned
[2013-01-19 17:19:30 UTC] ckeen changed owner from klovett to kon
[2013-01-19 17:44:15 UTC] kon changed status from assigned to closed
[2013-01-19 17:44:15 UTC] kon set resolution to fixed
[2013-01-19 17:44:15 UTC] kon wrote:
see Rel 3.3.3