spartacus
27th March 2009, 17:04
If the first day of week, for a company, is sunday. Then "week_dayno" of the function "utc.to.week()" delivers:

1 for sunday
2 for monday
3 for tuesday
.
.
.
7 for saturday

If the first day of week is monday I get:
1 for monday
2 for tuesday
.
.
.
7 for sunday

Am I right with that assumption ?

NPRao
27th March 2009, 19:28
Richard,

The programmer manual has additional link on:

ref long weekno The week number in the year. See Week handling.

There is more info on the calculation:

Dates,times, time zones overview (http://www.baanboard.com/programmers_manual_baanerp_help_functions_date_time_zones_overview)

Infor ERP LN handles week numbering according to ISO:5601. Week 01 is the week that includes the first Thursday of the year or January 4 . Monday is the first day of the week (that is, day 1). Sunday is the last day of the week (that is, day 7).

In the company-data settings in the data dictionary it is possible to define the first day of the week (that is, day 01) for individual Infor ERP LN users. If a user's first day of the week is Monday, then week numbering follows the ISO standard. However, if a user's first day of the week is other than Monday (Sunday or Wednesday, for example), the week number is calculated differently. The week number is always the ISO week number of the Monday that occurs in the user's week.

spartacus
30th March 2009, 11:42
Hi Prashanth,

thank you for your response. This is the documentation I based my assumption on! So I hope it is right.
Btw: I found in "itihra0001" some functions which may help with that stuff. The only disadvantage is that it seems to be a little old fashioned. They use num.to.week() instead if utc.to.week(), together with the domain "tcdate". But the function "itihra0001.convert.daynumber.to.dayname()" should work, if you call it with the right day-number.