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

Default to upcoming day of the week #43

Closed
j6k4m8 opened this issue Feb 2, 2015 · 1 comment
Closed

Default to upcoming day of the week #43

j6k4m8 opened this issue Feb 2, 2015 · 1 comment

Comments

@j6k4m8
Copy link

j6k4m8 commented Feb 2, 2015

There is perhaps a good reason for this behavior, so forgive me if this is intentional! My thought is that something like Friday should 'assume' [this] Friday, in that I am more likely to refer to an upcoming date than a past date by the day-of-the-week alone. (I think one would be more likely to refer to a past Friday as last Friday, even if it was only two or three days ago.)

I'm looking through the code now to see if I can PR; let me know if I should abandon!

@wanasit
Copy link
Owner

wanasit commented Feb 2, 2015

It really depends on the application and the type of text that you parse (Appointments, News, Emails, etc).

So, I don't think it good idea to assume that everything is upcoming date. Instead, I currently compare the closest 7-days window (from the reference date) to calculate default weekday, which I personally think quite reasonable for most domain.

However, I'm not going to stop you if you want to customize it. I would be happy to see your pull-request.

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

No branches or pull requests

2 participants