Calendar Formats
| From: | allan at lodestone dot co dot za | Date: | Wed, 03 Jan 2001 04:29:27 +0000 |
| Subject: | Calendar Formats | ||
| Groups: | php.pear | ||
| Request: | Send a blank email to php-pear+get-763@lists.php.net to get a copy of this message | ||
heya,
I don't know if you followed the Slashdot link a while back to
http://foxnews.com/etcetera/121800/calendar.sml
about a proposed new
calendar format. Anyways, attached is a class called Date_Human that allows
you to convert dates between the Gregorian format and the new Human format.
Whether it'll ever be of any use ....
One of the reasons for writing the thing was to try and code it according to
Chuck's RFC: Coding Standards document and also to document it according to
PHPDoc, so any feedback on whether I got it right or wrong would be
appreciated :)
On to the class itself - it contains two functions GregorianToHuman() and
HumanToGregorian() that convert the dates back and forth. The attached
archive also contains two files h2g.php and g2h.php that create a table
showing the equivalent dates in each format.
If you think this might come in handy some day can someone pls commit it to
cvs.
thanks
allan
Attachment: [application/x-gzip] Date_Human.tar.gz
Attachment: [application/x-gzip] Date_Human.tar.gz