mojombo / chronic

Chronic is a pure Ruby natural language date parser.
http://injekt.github.com/chronic
MIT License
3.24k stars 461 forks source link

request: teach chronic to parse "last quarter", "this quarter", etc. #24

Open aahoughton opened 13 years ago

aahoughton commented 13 years ago

If you're feeling studly, you could include a setting for "start of quarter-year", e.g., Oct 1st. Otherwise, the quarter-year would start on Jan 1, 00:00, and .. I think .. be almost exactly equivalent to seasons.

brianstarke commented 13 years ago

+1 vote from me :)

ghost commented 13 years ago

+1 here

leejarvis commented 13 years ago

I do plan on implementing this, but I don't want to set a milestone just yet. I'm currently in the process of immigration so I don't have a lot of time on my hands. If anyone wants to take a shot at this feature, you're welcome to. A QuarterRepeater should be fairly trivial to implement, my main focus is on bugs until I have more time, though. It is coming!

raldred commented 13 years ago

I like this, I think it should be a wider feature though with configurable ranges and contexts I would like to be able to use last working week / next working week / 2 working weeks ago and be returned a range, not just of the 7 days previous like 'last week' does but actual working weeks monday-friday.

Chronic.parse 'last working week', :guess => false it includes the weekend, maybe this is silently removing the 'working' part of my query

belt commented 12 years ago

Check out this project:

https://github.com/asanghi/fiscali

... it may help define what "first quarter" means.

JeskTop commented 11 years ago

I want to know, this issues was solved?

leejarvis commented 11 years ago

@JeskTop No, that's why it's still marked as open.

mkdynamic commented 10 years ago

Review on #273 appreciated.

evansagge commented 9 years ago

+1

EpSch commented 2 years ago

+1

EpSch commented 2 years ago

Any idea of a good, already working workaround?