IntlCalendar::after

(PHP 5 >= 5.5.0, PHP 7, PECL >= 3.0.0a1)

IntlCalendar::afterWhether this objectʼs time is after that of the passed object

说明

面向对象风格

public IntlCalendar::after ( IntlCalendar $other ) : bool

过程化风格

intlcal_after ( IntlCalendar $cal , IntlCalendar $other ) : bool

Returns whether this objectʼs time succeeds the argumentʼs time.

参数

cal

The IntlCalendar resource.

other

The calendar whose time will be checked against the primary objectʼs time.

返回值

Returns TRUE if this objectʼs current time is after that of the calendar argumentʼs time. Returns FALSE otherwise. Also returns FALSE on failure. You can use exceptions or intl_get_error_code() to detect error conditions.

范例

Example #1 IntlCalendar::after()

<?php
$cal1 
IntlCalendar::createInstance();
$cal2 = clone $cal1;

var_dump($cal1->after($cal2), //false
        
$cal2->after($cal1)); //false

$cal1->roll(IntlCalendar::FIELD_MILLISECONDtrue);

var_dump($cal1->after($cal2), //true
        
$cal2->after($cal1)); //false

相关文章
php collectable determine whether an object has been marked as garbagephp evperiodic returns the absolute time that this watcher is supposed to trigger nextphp libevent 函数 exit loop after a timephp expect 函数 waits until the output from a process matches one of the patterns a specified time period has passed or an eof is seenphp intlcalendar whether this objectʼs time is after that of the passed objectphp intlcalendar whether this objectʼs time is before that of the passed objectphp intlcalendar compare time of two intlcalendar objects for equalityphp intlcalendar calculate difference between given time and this objectʼs timephp intlcalendar create an intlcalendar from a datetime object or stringphp intlcalendar the maximum value for a field considering the objectʼs current timephp intlcalendar the minimum value for a field considering the objectʼs current timephp intlcalendar tell whether a day is a weekday weekend or a day that has a transition between the twophp intlcalendar get number representing the current timephp intlcalendar get time currently represented by the objectphp intlcalendar whether the objectʼs time is in daylight savings timephp intlcalendar whether another calendar is equal but for a different timephp intlcalendar whether date/time interpretation is in lenient modephp intlcalendar whether a certain date/time is in the weekendphp intlcalendar set whether date/time interpretation is to be lenientphp mongocursor sets whether this cursor will be left open after fetching the last results
关注编程学问公众号