29 points · by sallar · 13y ago · 12 comments
$idf = new IntlDateFormatter('fa_IR@calendar=persian',
IntlDateFormatter::FULL,
IntlDateFormatter::FULL,"Asia/Tehran",
IntlDateFormatter::TRADITIONAL);
right?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.
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?