This is an utility extension with functions related to working hours.
The provided functions are as follows:
Given a DateTime, returns whether it is an holiday.
Sets country code (used to retrieve the list of holidays).
Given a DateTime, returns whether it is a working day.
Sets the working days to be used by the extension. True means the weekday is a working day.
Default working days are from Monday to Friday.
Sets the working hours to be used by the extension. Default values are 9 and 18, respectively.
Note that this extension does not take into account lunch hour.
Gets the difference between two dates in working hours. No assumption is made over the given dates, they may be in any order.
Note, however, that lunch hour is counted as a working hour.
Supported country codes and holidays:
Europe
Andorra
Åland
Austria
Belarus
Belgium
Bulgaria
Croatia
Cyprus
Czech Republic
Denmark
Estonia
Finland
France
Germany
Greece
Hungary
Iceland
Ireland
Isle of Man
Italy
Jersey
Latvia
Liechtenstein
Lithuania
Luxembourg
Malta
Monaco
Netherlands
Norway
Poland
Portugal
Romania
Russia
Slovakia
Slovenia
Spain
Sweden
Switzerland
Turkey (without muslim based holidays)
Ukraine
United Kingdom
Asia
China
Kazakhstan
Mongolia
North America
Bahamas
Canada
Costa Rica
Cuba
Guatemala
Haiti
Mexico
Panama
Puerto Rico
United States
South America
Argentina
Bolivia
Brazil
Chile
Colombia
Ecuador
Guyana
Honduras
Paraguay
Peru
Suriname
Uruguay
Venezuela
Atlantic
Greenland
Africa
Botswana
Madagascar
Namibia
South Africa
Australia & Pacific
Australia
New Zealand