Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange behavior of the week function
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00929454
Message ID:
00929468
Vues:
7
>Why WEEK({^2004-12-31}) return 1 instead of 53

In Bata/Bolivia, I couldn't quite figure out if there was a well-defined rule, how the week numbering was defined in the company (i.e., which was the first week of the year). So, to have the maximum flexibility, I ended up creating a table, indicating which was the first week of each year (weeks stored as the date of the first day of the week, of week #1), and functions to convert from dates to week numbers, and back again, with the help of this table.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform