That incorrectly thinks 2100 is a leap. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ross Morrissey Sent: Friday, 3 June 2005 10:15 AM To: [email protected] Subject: RE: [U2] Finding last day of month
Aiming for SHORT (not clean, clear, or any of that other good stuff): PRINT "D": ; INPUT D PRINT D[1,6]:MOD(D[5,2]+D[5,2]>7,2)+30-(D[5,2]=2)*(2-MOD(D[1,4],4)#0) D?20040203 20040229 D?20030303 20030331 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marco Manyevere Sent: Thursday, June 02, 2005 10:31 AM To: [email protected] Subject: [U2] Finding last day of month Given a date like 20040203, I want to return the last valid date for that month and year (20040229 in this case). What is the shortest code fragment to achieve this? ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
