3 ms·
OK, it can't parse: The day before Sunday week The day before Sunday Next Sunday Sunday Now, you may have tried putting in "Sunday" and it worked, but
by RiderOfGiraffes 16y ago
OK, it can't parse:
The day before Sunday week
The day before Sunday
Next Sunday
Sunday
Now, you may have tried putting in "Sunday" and it worked, but it didn't when I tried it.
I had a leading space.
Going to the "Let use know" link takes me to a github issues reporting page. I stared at it for about 30 seconds, then decided life's too short and I'd report my findings here.
So I've made it parse some of the above, it appears that there we odd spaces, but I can't retrieve the exact cases now, so I can't really make a sensible bug report.
But it still doesn't parse "The day before Sunday week," nor "The day before a week on Sunday." It also doesn't parse "26-05-2010," the usual UK data format, but you probably knew that.
Is your test data set available?
- joestelmach 16y agoThanks for the feedback. I'll admit to the amateur mistake of not handling leading white space (that's now fixed on the master branch.) It looks like the only example from your list that couldn't be parsed is "The day before Sunday week". Forgive my ignorance, but I've never seen 'week' used in that context here in the US. If you'd be willing to describe the proper use, I'll look at implementing it. As for the UK format, please see the issue I created here: http://github.com/joestelmach/natty/issues#issue/3 http://github.com/joestelmach/natty/issues#issue/3, and lend some advice if you'd like. The test set is available here: http://github.com/joestelmach/natty/blob/master/src/test/gunit/DateParser.testsuite http://github.com/joestelmach/natty/blob/master/src/test/gun...
- RiderOfGiraffes 16y agoIn the UK and Australia, "Sunday week" would be taken to mean one week after the Sunday after today. Also phrased as "a week on Sunday." I have use for the library, but cannot use Java. It's nice to know that such a solution exists, and perhaps I can push towards an equivalent for my contexts. Thanks for your response.