gregor
gregor copied to clipboard
parse-time does not suppoort `b` periods.
When I pass in a string that uses b, I get an error saying that b is a special character, and to use the string b instead. I however am not looking for a literal b, but the time that the b pattern gives. For example:
#lang racket
(require gregor)
(parse-time "4PM" "b")
Gives me the following error:
The character [b] is reserved in pattern syntax. Literal ASCII letters must be enclosed in single quotes. E.g., 'b'.
context...:
/Users/leif/rsrc/gregor/gregor-lib/gregor/private/exn.rkt:32:0: raise-pattern-error
/Users/leif/rsrc/gregor/gregor-lib/gregor/private/pattern/lexer.rkt:27:0: pattern->ast-list
/Users/leif/rsrc/gregor/gregor-lib/gregor/private/parse.rkt:65:0: parse-time
/Users/leif/trash3.rkt: [running body]
@LeifAndersen Thanks for bringing this to my attention. The 'b' pattern didn't exist when I implemented Gregor. (I think this was the current version then: http://www.unicode.org/reports/tr35/tr35-37/tr35-dates.html#Date_Format_Patterns). I'll need to add this as part of my revision work. Gregor is going to turn into a datetime library. I haven't had quite enough time to work on it recently, but I expect to fairly soon.
This also means I need to be more careful when linking to CLDR from the documentation...
Ah, okay, thanks makes sense. Thank you.
As for linking to CLDR, why not just include a copy of the version you are using in the documentation itself?
Yes, I absolutely should do that.