Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Repeating Occurances
Message
De
23/01/2004 12:59:00
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00869890
Message ID:
00869991
Vues:
12
I'm not sure if this is what you're looking for, but I defined a set of date types:

ONE TIME DATE: User can specify a specific date, ie. Jan. 23, 2004
ANNUAL FIXED DATE: A date that recurs every year, ie. New Years, January 1.
ANNUAL FLOATING DATE: A date the recurs every year but not on the same exact date...ie. the Last Thursday in November or the 2nd Sunday in April.
DAY OF THE WEEK: ie. Casual Dress every Friday.
MONTHLY FIXED DATE: ie. Mortgage due on the 15th of every month
MONTHLY FLOATING DATE: ie. Wash car on last Saturday of every month.

You can define others if you want, but I found these to be sufficient. I allow the user to define the Holidays that they want based on these types into a table with the date type, a description of the date and the specifics required by the date type. (ie. ONE TIME DATE requires a date. ANNUAL FIXED DATE requires a Month and a day, ANNUAL FLOATING DATE requires 1ST|2ND|3RD|4TH|LAST, a day of the week and a month, etc...)

I have a method that accepts date parameter and returns whether or not that date is a holiday as defined by the user. I also created a variation of the method that runs for given month and year and returns an array of all holidays in that month...this allows me to create a graphical monthly calendar and quickly display all the holidays (or days that were defined) by the user in the monthly calendar.

Let me know if you are interested in more details.
Al
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform