Finding Leap Years

You will find that the DateTime type supports a number of static methods to check dates. For example, you can check whether a year is a leap year like this:

[DateTime]::IsLeapYear(1904)

Twitter This Tip! ReTweet this Tip!


Posted Sep 15 2010, 08:00 AM by ps1
Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.