Practical Astronomy Algorithms in .NET/C#
Loading...
Searching...
No Matches
PAUtils.cs
Go to the documentation of this file.
1using System;
2
3namespace PALib;
4
8public static class PAUtils
9{
13 public static bool IsLeapYear(this int inputYear)
14 {
15 double year = inputYear;
16
17 if (year % 4 == 0)
18 {
19 if (year % 100 == 0)
20 return (year % 400 == 0) ? true : false;
21 else
22 return true;
23 }
24 else
25 return false;
26 }
27}
Utility methods.
Definition PAUtils.cs:9
static bool IsLeapYear(this int inputYear)
Determine if year is a leap year.
Definition PAUtils.cs:13