VDF-GUIdance logo

  Visual DataFlex Logo

Shared knowledge leads to accumulated knowledge

        Printer Friendly Page

National Holidays

by Nils G. Svedmyr


This application displays national holidays per country and has a vast function library for the different holidays.
No Files Available
Date Created: 07/03/2011
Date Updated: 08/03/2011
Author: Nils G. Svedmyr
Company: RDC Tools International

Holiday dates function Library and database with all Nations characteristics incl. flags

This application is designed for Visual DataFlex 16 and uses the libraries for DAE's Graphical Library (version 2.2).
Thus you will need to have these installed.

The function library CalendarHoliday.pkg contains about 50 functions for different holidays. You pass an integer variable with the year and the function(s) will return the date for the holiday. For some of the functions you also need to pass a nation code.

At an aggregated level you have AmericanHolidays.pkg, SwedishHolidays.pkg and some other languages (see list below) - that is used in the sample National Holidays program to create database records for all dates for a given date interval for those countries. However, you don't need to use the function pack as in the sample application - it is just a demonstration of the functions. You could also use these functions ad hoc in your code.
It also contains an AutoReindex function logic that will automatically sense if your df_collate.cfg is different then what the database uses - and if not automatically reindex all tables prior starting the program. This is a generalized solution that might be usefull for you in other programs.

The Nations part contains data about every country in the world together with animated gif flags and a webservice that calculates currency exchange rates - together with the following information:
  ISO (International Standard Organization) Short country code
  ISO long code 
  Numeric ISO code
  Country Name
  Country's long name
  UN (United Nations) code
  Capital City
  ISO Currency code
  Currency text
  ISO currency number
  International TLD (Top Level Internet Domain)
  International calling code

Here's some screenshots of the application in action
The Nation's Data view shows the general data that is stored per country.
Note the extra exchange rate feature that uses a webservice to get the current exchange rate
Here you get a connection with calendar control - made by Peter Crook in Visual DataFlex code - and a library oversight of the date with holidays.
and -while having applied another skin using the skin selector also available in this project- the holidays view without the calendar object from Peter Crook.

Currently supported nations with detailed holidays functions are:
  • Sweden
  • United Kingdom
  • Netherlands
  • Norway
  • United States

And the list is growing!
More nations can be supported! We need your help as a developer to develop national holiday packages for those country that are missing from the list above - it's really easy - just follow the provided examples.

Please contact me via the forum thread below and I will assist you further if necessary!