chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-janitors] #966: srfi-19 does not recognise the first item in ab


From: Chicken Trac
Subject: [Chicken-janitors] #966: srfi-19 does not recognise the first item in abbreviation vectors for any language
Date: Sat, 19 Jan 2013 16:17:45 -0000

#966: srfi-19 does not recognise the first item in abbreviation vectors for any
language
----------------------------------------+-----------------------------------
 Reporter:  ckeen                       |       Owner:  klovett
     Type:  defect                      |      Status:  new    
 Priority:  major                       |   Milestone:  someday
Component:  unknown                     |     Version:  4.8.x  
 Keywords:  srfi-19, locales, scan-dat  |  
----------------------------------------+-----------------------------------
 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             <--

 }}}

-- 
Ticket URL: <http://bugs.call-cc.org/ticket/966>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]