intl
在线手册:中文  英文

The IntlCalendar class

(PHP 5.5.0, PECL >= 3.0.0a1)

简介

类摘要

IntlCalendar {
/* Constants */
const integer FIELD_ERA = 0 ;
const integer FIELD_YEAR = 1 ;
const integer FIELD_MONTH = 2 ;
const integer FIELD_WEEK_OF_YEAR = 3 ;
const integer FIELD_WEEK_OF_MONTH = 4 ;
const integer FIELD_DATE = 5 ;
const integer FIELD_DAY_OF_YEAR = 6 ;
const integer FIELD_DAY_OF_WEEK = 7 ;
const integer FIELD_DAY_OF_WEEK_IN_MONTH = 8 ;
const integer FIELD_AM_PM = 9 ;
const integer FIELD_HOUR = 10 ;
const integer FIELD_HOUR_OF_DAY = 11 ;
const integer FIELD_MINUTE = 12 ;
const integer FIELD_SECOND = 13 ;
const integer FIELD_MILLISECOND = 14 ;
const integer FIELD_ZONE_OFFSET = 15 ;
const integer FIELD_DST_OFFSET = 16 ;
const integer FIELD_YEAR_WOY = 17 ;
const integer FIELD_DOW_LOCAL = 18 ;
const integer FIELD_EXTENDED_YEAR = 19 ;
const integer FIELD_JULIAN_DAY = 20 ;
const integer FIELD_MILLISECONDS_IN_DAY = 21 ;
const integer FIELD_IS_LEAP_MONTH = 22 ;
const integer FIELD_FIELD_COUNT = 23 ;
const integer FIELD_DAY_OF_MONTH = 5 ;
const integer DOW_SUNDAY = 1 ;
const integer DOW_MONDAY = 2 ;
const integer DOW_TUESDAY = 3 ;
const integer DOW_WEDNESDAY = 4 ;
const integer DOW_THURSDAY = 5 ;
const integer DOW_FRIDAY = 6 ;
const integer DOW_SATURDAY = 7 ;
const integer DOW_TYPE_WEEKDAY = 0 ;
const integer DOW_TYPE_WEEKEND = 1 ;
const integer DOW_TYPE_WEEKEND_OFFSET = 2 ;
const integer DOW_TYPE_WEEKEND_CEASE = 3 ;
const integer WALLTIME_FIRST = 1 ;
const integer WALLTIME_LAST = 0 ;
const integer WALLTIME_NEXT_VALID = 2 ;
/* 方法 */
public bool add ( int $field , int $amount )
public bool after ( IntlCalendar $calendar )
public bool before ( IntlCalendar $calendar )
public bool clear ([ int $field = NULL ] )
private __construct ( void )
public static IntlCalendar createInstance ([ mixed $timeZone = NULL [, string $locale = NULL ]] )
public bool equals ( IntlCalendar $calendar )
public int fieldDifference ( float $when , int $field )
public static IntlCalendar fromDateTime ( mixed $dateTime )
public int get ( int $field )
public int getActualMaximum ( int $field )
public int getActualMinimum ( int $field )
public static array getAvailableLocales ( void )
public int getDayOfWeekType ( int $dayOfWeek )
public int getErrorCode ( void )
int intlcal_get_error_code ( IntlCalendar $calendar )
public string getErrorMessage ( void )
string intlcal_get_error_message ( IntlCalendar $calendar )
public int getFirstDayOfWeek ( void )
public int getGreatestMinimum ( int $field )
public static Iterator getKeywordValuesForLocale ( string $key , string $locale , boolean $commonlyUsed )
public int getLeastMaximum ( int $field )
public string getLocale ( int $localeType )
public int getMaximum ( int $field )
public int getMinimalDaysInFirstWeek ( void )
public int getMinimum ( int $field )
public static float getNow ( void )
public int getRepeatedWallTimeOption ( void )
public int getSkippedWallTimeOption ( void )
public float getTime ( void )
public IntlTimeZone getTimeZone ( void )
public string getType ( void )
public int getWeekendTransition ( string $dayOfWeek )
public bool inDaylightTime ( void )
public bool isEquivalentTo ( IntlCalendar $calendar )
public bool isLenient ( void )
public bool isSet ( int $field )
public bool isWeekend ([ float $date = NULL ] )
public bool roll ( int $field , mixed $amountOrUpOrDown = TRUE )
public bool set ( int $field , int $value )
public bool set ( int $year , int $month [, int $dayOfMonth = NULL [, int $hour = NULL [, int $minute = NULL [, int $second = NULL ]]]] )
public bool setFirstDayOfWeek ( int $dayOfWeek )
public ReturnType setLenient ( string $isLenient )
public bool setRepeatedWallTimeOption ( int $wallTimeOption )
public bool setSkippedWallTimeOption ( int $wallTimeOption )
public bool setTime ( float $date )
public bool setTimeZone ( mixed $timeZone )
public DateTime toDateTime ( void )
}

预定义常量

IntlCalendar::FIELD_ERA

IntlCalendar::FIELD_YEAR

IntlCalendar::FIELD_MONTH

IntlCalendar::FIELD_WEEK_OF_YEAR

IntlCalendar::FIELD_WEEK_OF_MONTH

IntlCalendar::FIELD_DATE

IntlCalendar::FIELD_DAY_OF_YEAR

IntlCalendar::FIELD_DAY_OF_WEEK

IntlCalendar::FIELD_DAY_OF_WEEK_IN_MONTH

IntlCalendar::FIELD_AM_PM

IntlCalendar::FIELD_HOUR

IntlCalendar::FIELD_HOUR_OF_DAY

IntlCalendar::FIELD_MINUTE

IntlCalendar::FIELD_SECOND

IntlCalendar::FIELD_MILLISECOND

IntlCalendar::FIELD_ZONE_OFFSET

IntlCalendar::FIELD_DST_OFFSET

IntlCalendar::FIELD_YEAR_WOY

IntlCalendar::FIELD_DOW_LOCAL

IntlCalendar::FIELD_EXTENDED_YEAR

IntlCalendar::FIELD_JULIAN_DAY

IntlCalendar::FIELD_MILLISECONDS_IN_DAY

IntlCalendar::FIELD_IS_LEAP_MONTH

IntlCalendar::FIELD_FIELD_COUNT

IntlCalendar::FIELD_DAY_OF_MONTH

IntlCalendar::DOW_SUNDAY

IntlCalendar::DOW_MONDAY

IntlCalendar::DOW_TUESDAY

IntlCalendar::DOW_WEDNESDAY

IntlCalendar::DOW_THURSDAY

IntlCalendar::DOW_FRIDAY

IntlCalendar::DOW_SATURDAY

IntlCalendar::DOW_TYPE_WEEKDAY

IntlCalendar::DOW_TYPE_WEEKEND

IntlCalendar::DOW_TYPE_WEEKEND_OFFSET

IntlCalendar::DOW_TYPE_WEEKEND_CEASE

IntlCalendar::WALLTIME_FIRST

IntlCalendar::WALLTIME_LAST

IntlCalendar::WALLTIME_NEXT_VALID

Table of Contents


intl
在线手册:中文  英文
易百教程