< Back

Get-MrLeapYear

Sat Jan 18, 2020 4:35 pm

NAME Get-MrLeapYear



SYNOPSIS

Get-MrLeapYear is used to determine whether or not a specific year is a leap year.





SYNTAX

Get-MrLeapYear [[-Year] <Int32[]>] [<CommonParameters>]





DESCRIPTION

Get-LeapYear is a function that is used to determine whether or not the specified

year(s) are leap years. Contrary to popular belief, leap year does not occur every

four years. According to Wikipedia, if a year is divisible by 400 then it's a leap

year, else if the year is divisible by 100 then it's a normal year, else if the year

is divisible by 4 then it's a leap year, else it's a normal year. Source:

http://en.wikipedia.org/wiki/Leap_year





PARAMETERS

-Year <Int32[]>

The year(s) specified in integer form that you would like to determine whether or

not they are a leap year. The default is the current year.



Required? false

Position? 1

Default value (Get-Date).Year

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

Integer





OUTPUTS

String





NOTES





Author: Mike F Robbins

Website: http://mikefrobbins.com

Twitter: @mikefrobbins



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-MrLeapYear













-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-MrLeapYear -Year 2010, 2011, 2012, 2013, 2014, 2015













-------------------------- EXAMPLE 3 --------------------------



PS C:\\>1890..1910 | Get-MrLeapYear















RELATED LINKS