Opened 11 years ago

Closed 11 years ago

#966 closed defect (fixed)

srfi-19 does not recognise the first item in abbreviation vectors for any language

Reported by: Christian Kellermann Owned by: Kon Lovett
Priority: major Milestone: someday
Component: extensions Version: 4.8.x
Keywords: srfi-19, locales, scan-dat Cc:
Estimated difficulty:

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             <--

Change History (3)

comment:1 Changed 11 years ago by Christian Kellermann

Component: unknownextensions

comment:2 Changed 11 years ago by Christian Kellermann

Owner: changed from klovett to Kon Lovett
Status: newassigned

comment:3 Changed 11 years ago by Kon Lovett

Resolution: fixed
Status: assignedclosed

see Rel 3.3.3

Note: See TracTickets for help on using tickets.