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.