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

Allow time_class to be given as an option to Chronic.parse #310

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lautis
Copy link

@lautis lautis commented Jul 22, 2015

This implements time_class option to Chronic.parse. You can still set the global default with Chronic.time_class.

The implementation is a bit brute force-ish. I used options hash given to most handler methods to detect time class, but I later realised that the handlers are always included in an object containing the options hash. Options could be refactored away although then the interface would change there a bit.

Fixes #182.

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

Successfully merging this pull request may close these issues.

1 participant