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

Add "chronic" gem to deal with ambiguous dates? #87

Open
dannguyen opened this issue May 21, 2015 · 2 comments
Open

Add "chronic" gem to deal with ambiguous dates? #87

dannguyen opened this issue May 21, 2015 · 2 comments

Comments

@dannguyen
Copy link
Contributor

I know [mojombo/chronic] is a big gem, but it smoothes a few things with date parsing. In particular, it has some conveniences for ambiguous dates.

Example: Sen. Meehan's Drupal-views-powered press release page which outputs dates in the ambiguous format of "03 Feb" (issue: #84, my recent commit: dannguyen@91d188e)

A possible solution is that, for each page of press releases, download and parse the first result, extract the full date, then use chronic's :context or :now arguments to disambiguate the dates for the rest of the list of press releases. It's possible to hand-roll a solution, but chronic is probably more stable without being too much of a pain of a dependency.

@dwillis
Copy link
Contributor

dwillis commented May 21, 2015

Yeah, this is a problem with some other sites as well. So far I've loaded each release's URL to get the full date, which is on that page, but this is something worth discussing.

@dwillis
Copy link
Contributor

dwillis commented May 29, 2015

An update: Meehan's pages can be scraped with the date by using our Drupal scraper.

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