Re:JDateTime - Iranian (Shamsi) Date for PHP
by revelation on Saturday February 23, 2013 @01:46PM
(#5270892)
Thank god they finally introduced all this classes and inheritance kerfuffle in PHP, so we can now manually handle Iranian dates by calling "toJalali" on a pseudo-singleton "jDateTime" class.
In all seriousness, I wanted to punch myself in the face when I had to instantiate a "GregorianCalendar" in Java, but the general idea has a lot of merit, even if the implementation is terrible.
PHP has a wrapper for ICU.
In all seriousness, I wanted to punch myself in the face when I had to instantiate a "GregorianCalendar" in Java, but the general idea has a lot of merit, even if the implementation is terrible.
[0] http://en.wikipedia.org/wiki/Great_Neck,_New_York
Line 482 - $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
Umm, what about leap years, you know the ones that have 29 days in February?