DateTime IsLeapYear extension method

This method returns true if the date passed is in a leap year

Public Function IsLeapYear(Extends value As DateTime) As Boolean
  Var d As New DateTime(value.year, 12, 31, 12, 0, 0, 0, Value.Timezone) ' Hour set to midday is to avoid any possible daylight savings adjustments.
  Return d.DayOfYear = 366 ' Returns true if 31/12/xx is the 366th day of the year.
End Function