src/umbraco.presentation.xslt.Exslt/ExsltDatesAndTimes.cs
/// <summary>
/// Implements the following function
///   boolean date:leap-year(string)
/// </summary>
/// <returns>True if the specified year is a leap year</returns>
/// <remarks>Does not support dates in the format of the xs:yearMonth or 
/// xs:gYear types</remarks>
Implements the following function
boolean date:leap-year(string)
Implements the following function boolean date : leap - year ( string )
public static bool leapyear(string d){
			try{
				DateTime date = DateTime.Parse(d); 
				return IsLeapYear(date.Year); 
			}catch(FormatException){
				return false; 
			}
		}
public static bool leapyear ( string d ) { try { DateTime date = DateTime . Parse ( d ) ; return IsLeapYear ( date . Year ) ; } catch ( FormatException ) { return false ; } }
Implements the following function
boolean date:leap-year(string)
Implements the following function boolean date : leap - year ( string )
True if the specified year is a leap year
True if the specified year is a leap year
d
string
remarks
Does not support dates in the format of the xs:yearMonth or
xs:gYear types
Does not support dates in the format of the xs : yearMonth or xs : gYear types