<?php
$time = strtotime("2013-03-03 00:00:00 UTC");
$formatter = IntlDateFormatter::create("en_US", NULL, NULL, "Europe/Amsterdam");
echo "before: ", $formatter->format($time), "\n";
/* note that the calendar's locale is not used! */
$formatter->setCalendar(IntlCalendar::createInstance(
"America/New_York", "pt_PT@calendar=islamic"));
echo "after: ", $formatter->format($time), "\n";
The above example will output:
before: Sunday, March 3, 2013 at 1:00:00 AM Central European Standard Time
after: Saturday, RabiÊ» II 20, 1434 at 7:00:00 PM Eastern Standard Time