This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Sat Oct 18 17:29:11 -0700 2008 | |
| |
README.rdoc | Sun Oct 19 04:06:01 -0700 2008 | |
| |
Rakefile | Sat Oct 18 17:27:42 -0700 2008 | |
| |
lib/ | Sun Oct 19 04:00:35 -0700 2008 | |
| |
spec/ | Sun Oct 19 04:00:35 -0700 2008 |
README.rdoc
DateRange
Simple plugin for parsing out date ranges from user input.
Example
DateRange.parse("2008 - 2010")
will give you Array consisting of 2 elements: [start_of_range, end_of_range].
It is pretty clever about recognizing what user wants, just check out the code to see all the things it does.
It will return nil if one of the times are corrupt (like 13th month) or missing.
It will also look at context if no end time is given so:
- 2008 becomes 2008-01-01 00:00:00 - 2008-12-31 23:59:59
- 2008-01 becomes 2008-01-01 00:00:00 - 2008-01-31 23:59:59
- 2008-01-01 becomes 2008-01-01 00:00:00 - 2008-01-01 23:59:59
- and so forth…
Copyright © 2008 Artūras Šlajus <x11@arturaz.net>, released under the MIT license







