` 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 November 21, 2024, 8:39 am
This article has been viewed 35213 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: