|
IntlCalendar::isLenientWhether date/time interpretation is in lenient mode BeschreibungObjektorientierter Stil
public bool IntlCalendar::isLenient
( void
)
Prozeduraler Stil
bool intlcal_is_lenient
( IntlCalendar
$cal
)Returns whether the current date/time interpretations is lenient (the default). If that is case, some out of range values for fields will be accepted instead of raising an error. Parameter-Liste
RückgabewerteA bool representing whether the calendar is set to lenient mode. Beispiele
Beispiel #1 IntlCalendar::isLenient
<?phpDas oben gezeigte Beispiel erzeugt folgende Ausgabe:
string(20) "01/07/2013, 00:00:00"
bool(true)
string(20) "02/08/2013, 00:00:00"
bool(false)
Fatal error: Uncaught exception 'IntlException' with message 'datefmt_format_object: error obtaining instant from IntlCalendar' in /home/foobar/example.php:16
Stack trace:
#0 /home/foobar/example.php(16): IntlDateFormatter::formatObject(Object(IntlGregorianCalendar))
#1 {main}
thrown in /home/foobar/example.php on line 16
|