Nov 27
Okay, technically if something's "undiscovered", no one knows about it...and it's impossible for something in a programming language to be undiscovered because for it to exist, someone has to know about it...in fact, a lot of someones have to know about it. Regardless...

I was recently reading about how difficult it was for someone to create a DATE field in an Atom feed (they were creating a home-brew blog/cms with Python). Well, accidentally while researching what the php.ini file directives (found in PHP 5.2.0+, but available since 5.0.0 according to Zend) for the date.sunset_zenith and date.sunrise_zenith were for. I still didn't entirely figure it out, but I can still set the latitude and longitude correctly. However, while looking for this information, I found that PHP apparently has CONST values for many abstract date formats...all thanks to W3Schools!

Constants: ATOM, DATE_COOKIE, DATE_ISO8601, DATE_RFC821, DATE_RFC850, DATE_RFC1036, DATE_RFC1123, DATE_RFC2822, DATE_RSS, and DATE_W3C

Now, it is very true that PHP's date functions are extremely thorough and easy to use, as well as to convert to/from. However, if you have constant values, why the heck not use them?!

Posted by Brendon Kozlowski

0 Trackbacks

  1. No Trackbacks

0 Comments

Display comments as(Linear | Threaded)
  1. No comments

Add Comment


Standard emoticons like :-) and ;-) are converted to images.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

BBCode format allowed