Метод | Описание | |
---|---|---|
create ( string $class, integer $year = null, string $locale = self::DEFAULT_LOCALE ) : |
Create a new holiday provider instance. | |
getAvailableLocales ( ) : array | Returns a list of available locales. | |
getProviders ( ) : array | Returns a list of available holiday providers. | |
nextWorkingDay ( string $class, $startDate, $workingDays = 1 ) : DateTime | ||
prevWorkingDay ( string $class, $startDate, $workingDays = 1 ) : DateTime |
public static create ( string $class, integer $year = null, string $locale = self::DEFAULT_LOCALE ) : |
||
$class | string | holiday provider name |
$year | integer | year for which the country provider needs to be created. Year needs to be a valid integer between 1000 and 9999. |
$locale | string | The locale to use. If empty we'll use the default locale (en_US) |
Результат | An instance of class $class is created and returned |
public static getAvailableLocales ( ) : array | ||
Результат | array | list of available locales |
public static getProviders ( ) : array | ||
Результат | array | list of available holiday providers |
public static nextWorkingDay ( string $class, $startDate, $workingDays = 1 ) : DateTime | ||
$class | string | holiday provider name |
$startDate | DateTime Start date, defaults to today | |
$workingDays | int | |
Результат | DateTime |
public static prevWorkingDay ( string $class, $startDate, $workingDays = 1 ) : DateTime | ||
$class | string | holiday provider name |
$startDate | DateTime Start date, defaults to today | |
$workingDays | int | |
Результат | DateTime |