Brian Dunning's FileMaker Custom Functions

CF_IsLeapYear ( SetDate )

Calculates if the current year is a leap-year

  Average rating: 4.3 (25 votes) Log in to vote

Carlos Bittar   Carlos Bittar
none
I have no website, sorry

Share on Facebook Share on Twitter

  Sample input:
CF_IsLeapYear(10/21/2016)
  Sample output:
The chosen date is a leap-year

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Just calculates if the selected date is a leap-year.
Please be sure to set the date with 4-digits year.

 

Comments

William   William, Boston
Dec 11, 2015
Any year which is divisible by 100 is not a leap year!
Regards
WW
 
Ron Greene   Ron Greene, Phoenix, AZ
Dec 27, 2015
Case (
IsEmpty ( SetDate ) ; "Please, set a date." ;
Mod ( Year ( SetDate ) ; 400 ) = 0 ; "The chosen date is a leap-year";
Mod ( Year ( SetDate ) ; 100 ) = 0 ; "The chosen date is NOT a leap-year" ;
Mod ( Year ( SetDate ) ; 4 ) = 0 ; "The chosen date is a leap-year" ;
"The chosen date is NOT a leap-year"
)
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 15 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: