2017-10-24
1.0.0
Luísa Lourenço
All
.NET
Libraries
[Overview]
An application with utility functions related to business hours.
[Detail]
This is an utility extension with functions related to working hours.
The provided functions are as follows:
bool isHoliday(DateTime InputDateTime)
Given a DateTime, returns whether it is an holiday.
void setCountryCode(string CountryCode)
Sets country code (used to retrieve the list of holidays).
bool isWorkingday(DateTime InputDateTime)
Given a DateTime, returns whether it is a working day.
void setWorkingDays(bool Sunday, bool Monday, bool Tuesday, bool Wednesday, bool Thursday, bool Friday, bool Saturday)
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.
void setWorkingHours(int BeginWorkingHour, int EndWorkingHour)
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.
int MssDiffWorkingHours(DateTime ssDateTime1, DateTime ssDateTime2)
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
Russia
Turkey (without muslim based holidays)
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