ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Date and time functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Indicates that a day (or a list of days) is a public holiday. This public holiday can correspond, for example, to a fixed date in a year, a regular date every year or a constant.
Remarque: These public holidays will be used:
  • by the Calendar control.
  • WINDEVWEBDEV - Server codeAndroidiPhone/iPadIOS WidgetMac CatalystPHP by the Organizer control.
  • WINDEVWEBDEV - Server codeAndroidiPhone/iPadIOS WidgetMac CatalystPHP by the Scheduler control.
To find out whether a day is a public holiday through programming, simply use BankHoliday.
Example
// Suppression de tous les jours fériés
BankHolidayDeleteAll()
// Initialisation des 11 jours fériés communs aux départements français et DOM/TOM
BankHolidayAdd("0101")		// 1er Janvier
BankHolidayAdd(bhEasterMonday)	// Lundi de Pâques
BankHolidayAdd("0501")		// 1er Mai
BankHolidayAdd("0508")		// 8 Mai
BankHolidayAdd(bhAscensionDay)	// Jeudi de l'Ascension
BankHolidayAdd(bhWhitMonday)	// Lundi de Pentecôte
BankHolidayAdd("0714")		// 14 Juillet
BankHolidayAdd("0815")		// 15 Août (Assomption)
BankHolidayAdd("1101")		// Toussaint
BankHolidayAdd("1111")		// 11 Novembre
BankHolidayAdd("1225")		// Noël

// Ajout de 2 jours fériés supplémentaires pour la Moselle et l'Alsace
BankHolidayAdd("1226" + CR + bhGoodFriday)
Syntax
BankHolidayAdd(<New public holidays>)
<New public holidays>: Character string or Character String constant
Can correspond to:
  • A 4-digit date (in MMDD format) to define a fixed public holiday (e.g., "1225" for Christmas).
  • An 8-digit date (in YYYYMMDD format) to define a public holiday for a specific year (e.g., "20080808" for August 8th, 2008).
  • A date in the following format: <Month>_<Week number>_<Week day number>. For example: 11_2_3 for the 2nd Wednesday in November.
  • One of the following constants:
    bhAscensionDayAscension day.
    Note: The corresponding date is Easter + 39 days..
    bhEasterDayEaster Sunday.
    Note: The corresponding date can be obtained with the Easter function..
    bhEasterMondayEaster Monday.
    Note: The corresponding date is Easter + 1 day.
    bhGoodFridayGood friday.
    Note: The corresponding date is Easter Day - 2 days.
    bhWhitMondayWhit Monday.
    Note: The corresponding date is Easter + 50 days..
  • a combination of the above-mentioned possibilities. The days found in this list must be separated by a CR character (carriage return).
Remarks
  • This function is used to customize the application according to the country and/or to the local regulations.
  • This function has a global effect and must be used at the beginning of the application.
  • BankHolidayAdd can be used after the call to BankHoliday.
Related Examples:
The Calendar control Unit examples (WINDEV): The Calendar control
[ + ] Four methods for using the Calendar control:
- Using the Calendar control found in the WINDEV toolbar
- Using CalendarOpen and CalendarPicker as well as CalendarSelect (multi-selection)
- Using ..CalendarButton
- Using BankHolidayAdd
Business / UI classification: Neutral code
Component: wd300obj.dll
Minimum version required
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/19/2024

Send a report | Local help