View previous topic :: View next topic
|
Author |
Message |
Delip
New User
Joined: 13 Sep 2007 Posts: 46 Location: Bangalore
|
|
|
|
I want to check if year is a leap year or not. I want to know if the remainder of year/4 is zero or not.Is there any function in easy trieve?
Thanks In advance |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Delip wrote: |
I want to check if year is a leap year or not. I want to know if the remainder of year/4 is zero or not.Is there any function in easy trieve?
Thanks In advance |
You need to check for years ending in 00 by dividing by 400 also. |
|
Back to top |
|
|
Delip
New User
Joined: 13 Sep 2007 Posts: 46 Location: Bangalore
|
|
|
|
Thank you.But any idea how we can check |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
One way is to multiply the answer by 4 and compare against the original value. If they are equal, the number is divisible by 4.
As Craig mentioned, there are additional considerations to determine leap year. |
|
Back to top |
|
|
Delip
New User
Joined: 13 Sep 2007 Posts: 46 Location: Bangalore
|
|
|
|
Thank you.It is working now. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome
Thank you for letting us know it is working.
d |
|
Back to top |
|
|
|