TheUpshot/statement

Add "chronic" gem to deal with ambiguous dates?

dannguyen opened this issue · 2 comments

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.

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.

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