-
Notifications
You must be signed in to change notification settings - Fork 0
DateTime formatting for humans
khebbie/ProtoTime
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Prototime is an extension to DateTime for .Net intented for making formating easier.
The way it works is that you give an example of how you want the date formatted, instead of the weird cult of 'dd MMM Hmss'
So instead of 'd MMM yyyy' you would write this example '31 Jun 2008' and get a string formatted accordingly.
This is still software in alpha, though dates are pretty much done
Right now the following examples works (probably some combinations of them works as well)
| January | September |
| Jan | Sep |
| Jan 1 | Sep 8 |
| Jan 31 | Sep 08 |
| Jan 31 | Sep 08 |
| Jan 1, 1999 | Sep 8, 2011 |
| Monday | Thursday |
| Tue, Jan 1 | Thu, Sep 8 |
| Tuesday, January 1, 1999 | Thursday, September 8, 2011 |
| 01/1999 | 09/2011 |
| 01/31 | 09/08 |
| 12/99 | 09/11 |
| 01/31/1999 | 09/08/2011 |
| 12/31/99 | 09/08/11 |
| 31/12 | 08/09 |
| 31/12/99 | 08/09/11 |
| 31-Jan-1999 | 08-Sep-2011 |
| 1999-12-31 | 2011-09-08 |
| DOB: 12-31-1999 | DOB: 09-08-2011 |
Since there are many many things represented by two digits (month, day, year, time), each should be represented by the highest number valid for it, ie. 31/12/99 would be "December 31. 1999"
I have not started work on timestamps at all...
Prototime is inspired by Stamp for Ruby
http://github.com/jeremyw/stamp
About
DateTime formatting for humans
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published