` Week of year (Pascal Gulikers ) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Week of year
2001-01-17 -- Pascal Gulikers
 
Actually, this is the correct one: CLC_WEE PROCEDURE (pDate) ! Declare Procedure lThisThursday LONG lFirstThursday LONG CODE ! weekno's according to ISO 8601: ! - week starts at monday ! - first thursday of year is always in week 1 ! - 4th of Januari always in week 1 if pDate < 1 then return(0). lThisThursday = pDate - ((pDate - 1) % 7) + 3 lFirstThursday = date(1,1,year(lThisThursday)) + 6 - ((date(1,1,year(lThisThursday)) + 2) % 7) return((lThisThursday - lFirstThursday) / 7 + 1)


Today is April 25, 2024, 5:34 pm
This article has been viewed 35106 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: