For Programmers: Free Programming Magazines  


Home > Archive > Clarion > January 2005 > Re: Week No. Algorithm









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Week No. Algorithm
enchong

2005-01-12, 8:55 am

Hey I have a proposition for you about clarion programming, ASAP. Do
you have contact number? Or can you call or text me at 09209001680 or
8996724.

Edsel
Jeroen van Veeren wrote:
> On 1 Mar 1997 14:02:33 -0400, danger@i-manila.com.ph (Dante) wrote:
>
return the[color=darkred]
(e.g. some[color=darkred]
>
> Here is a piece of code to get a wnumber:
> You can make it to a function.
>
> CALC_WEEK PROCEDURE ! THIS FUNCTION
> CALCULATES
> ! THE WEEK NUMBER
>
> VANDAAG LONG ! TODAY,S DATE
> JAAR LONG ! THIS YEAR IS
> JAN1 LONG ! DAY OF JANUARI 1
> DAYONE LONG ! DAYNUMBER OF
> JANUARI 1
> MONDAY1 LONG ! MONDAY IN WEEK OF
> JAN 1
> WEEK LONG ! HOLDS WEEKNUMBER
> CODE
> VANDAAG = TODAY() ! GET DATE
> JAAR = YEAR(VANDAAG) ! CALCULATE THE YEAR
> (CLARION)
> JAN1 = DATE(1,1,JAAR) ! CALCULATE NUMBER

OF
> JAN1
> DAYONE = JAN1 % 7 ! CALCULATE

REMAINDER
> OF
> CASE DAYONE ! WEEK DAYS
> OF 1
> MONDAY1 = JAN1
> OF 2 OROF 3 OROF 4 OROF 5
> MONDAY1 = JAN1 - DAYONE + 1
> OF 6 OROF 7
> MONDAY1 = JAN1 + 9 - DAYONE
> .
> WEEK = (((VANDAAG - (VANDAAG - MONDAY1) % 7) - MONDAY1) / 7) + 1
> MEM:WEEK = WEEK
> MEM:JAAR = JAAR


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com