Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse-time does not suppoort b periods. #12

Open
LeifAndersen opened this issue Mar 30, 2016 · 5 comments
Open

parse-time does not suppoort b periods. #12

LeifAndersen opened this issue Mar 30, 2016 · 5 comments

Comments

@LeifAndersen
Copy link

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]
@97jaz
Copy link
Owner

97jaz commented Mar 30, 2016

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

@97jaz
Copy link
Owner

97jaz commented Mar 30, 2016

This also means I need to be more careful when linking to CLDR from the documentation...

@LeifAndersen
Copy link
Author

Ah, okay, thanks makes sense. Thank you.

@LeifAndersen
Copy link
Author

As for linking to CLDR, why not just include a copy of the version you are using in the documentation itself?

@97jaz
Copy link
Owner

97jaz commented Mar 30, 2016

Yes, I absolutely should do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants