NCL Home > Documentation > Functions > Date routines

isleapyear

Determines if a given year is a leap year (Gregorian calendar).

Prototype

	function isleapyear (
		year  : integer   
	)

	return_val [dimsizes(year)] :  logical

Arguments

year

A multi-dimensional integer array or scalar value representing years. Values must be >= 0.

Return value

A logical array of the same size as year. True = leap, False = no leap.

Description

Determines if a given year is a leap year (Gregorian calendar).

See Also

day_of_year, day_of_week, days_in_month, monthday

Examples

Example 1

; Every element of isleap will be false in this case
isleap = isleapyear((/1997,1993,1900,1990/))