Re: [racket-users] a question or two regarding Gregor

2020-05-01 Thread Tim Hanson
very helpful that you linked to the issue, thank you. I now understand there are non-trivial problem domain issues (for example, “CDT” is ambiguous, probably even with locale specified.) I will think about how to tackle my specific problem and whether I can help with issues like these. --

Re: [racket-users] a question or two regarding Gregor

2020-04-30 Thread Tim Hanson
Thanks for the quick reply, Jon! OK, good to know. Maybe I can add the ones I need (if I can figure out how...). :) -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an

Re: [racket-users] a question or two regarding Gregor

2020-04-30 Thread Jon Zeppieri
Only a small number of zone formats are supported in parsing mode. This is discussed a bit in https://github.com/97jaz/gregor/issues/25. The situation could definitely be improved. - Jon On Thu, Apr 30, 2020 at 11:33 AM Tim Hanson wrote: > > p.s. I'm stuck on parsing one pattern that comes up

Re: [racket-users] a question or two regarding Gregor

2020-04-30 Thread Tim Hanson
p.s. I'm stuck on parsing one pattern that comes up in my data. Here's a corresponding test: (parameterize ([current-locale "en"]) (check-equal? (parse-datetime "Sun, 21 Jun 2015 17:50:44 -0500 (CDT)" "EEE, dd MMM HH:mm:ss ()") (datetime 2015 6 21 17 50

Re: [racket-users] a question or two regarding Gregor

2020-04-28 Thread Tim Hanson
Thanks, Jon! I agree with your analysis and thoughts about which cases should always raise exceptions. (I can't recall whether you scan patterns that include semi-redundant information such as day-of-week; wondered just now whether a contradictory day of week would be another category of

Re: [racket-users] a question or two regarding Gregor

2020-04-27 Thread Jon Zeppieri
On Mon, Apr 27, 2020 at 2:38 AM Tim Hanson wrote: > > hi, I've installed and am trying out > > Gregor: a date and time library for Racket > > and find it to be very powerful and useful. Thanks! > > In my current application (digging through mail headers) I'm wondering > whether there is a

Re: [racket-users] a question or two regarding Gregor

2020-04-27 Thread Tim Hanson
Thanks. Something like that will let me proceed for now. I'd still be curious what folks think about an approach avoiding exceptions. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from

Re: [racket-users] a question or two regarding Gregor

2020-04-27 Thread Ben Greenman
On 4/27/20, Tim Hanson wrote: > > I thought I'd check here: > - does this seem like a reasonable idea? > - is mine an unusual use case and most folks know what format to expect and > the exception approach is fine? I've written code like this before and used it in a contract. ``` (define