Sorry Frisco, I sent out the wrong one. You have one with some extra parentheses, I believe.

-                if( year % 4 == 0 ) {
+ if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) {

jim

On Jun 12, 2007, at 4:27 PM, Jim Grandy wrote:

I think we need the diff...

Modified: openlaszlo/branches/legals/lps/components/base/ basedatepicker.lzx
===================================================================
--- openlaszlo/branches/legals/lps/components/base/ basedatepicker.lzx 2007-06-12 19:03:15 UTC (rev 5392) +++ openlaszlo/branches/legals/lps/components/base/ basedatepicker.lzx 2007-06-12 22:43:49 UTC (rev 5393)
@@ -300,7 +300,7 @@
             var returnValue;

             if( month == 1 ) {
-                if( year % 4 == 0 ) {
+ if ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0) {
                     returnValue = 29;
                 } else {
                     returnValue = 28;

On Jun 12, 2007, at 4:19 PM, Frisco Del Rosario wrote:

Change 20070612-laszlosystems-U by [EMAIL PROTECTED] on 2007-06-12 16:09:08 PDT
    in /Users/laszlosystems/src/svn/openlaszlo/branches/legals
    for http://svn.openlaszlo.org/openlaszlo/branches/legals

Summary: Leap year check in basedatepicker improved (years divisible by 100 are only leap years when divisible by 400)

New Features:

Bugs Fixed: LPP-3330

Technical Reviewer: (pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:


Tests:

Files:
M      lps/components/base/basedatepicker.lzx

--
assertEquals(Frisco Del Rosario, OpenLaszlo tester)


Reply via email to