Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Work days between two dates - finally!
Message
De
10/06/2003 07:40:35
 
 
À
10/06/2003 02:35:45
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00797684
Message ID:
00798290
Vues:
25
Hi Cetin,

your argomentation is correct.

Your time computation is O(1), not O(n) where n=ABS(d2-d1).

For more generic solution,
is need a program that return a array[7] with the count of any week day.

nWeekDay[1] is number of Sunday
nWeekDay[2] is number of Monday
....

With this i can define arbitrary work day on the week.
Example:

if i work Monday,Wednesday,Thursday,Saturday
then
workdays is nWeekDay[2]+nWeekDay[4]+nWeekDay[5]+nWeekDay[7].

Fabio
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform