Its syntax is: WoY( <dDate>, <lIso> ) -> nWeek
But in this sample:It returns ISO-based week number, i.e. in range 0..52, by default (or passing TRUE as second parameter), or in range 1..52 if lIso is FALSE.
Code: Select all
Function Main
MsgBox(WoY(hb_CtoD("07-01-2017","dd-mm-yyyy"))) // 2 ?
Return
Day 7 of January of 2017. Would it be the first week of the year by given that the week starts on Sunday. This was announced by Eduardo in this post. Others dates also can be with wrong result (for sure).
I found the probable error in the C function at:
I have translated all C functions envolved to PRG in case of replacement and my better understanding of the code.
I have already announced this bug at Harbour forum and we shall wait their return and fixing. Otherwise, we could provide the substitute function to fix this problem.
Keeping our community informed.