std.datetime.date.DateTimeException if the new year is not a leap year and if the resulting date would be on February 29th.
assert(DateTime(Date(1999, 7, 6), TimeOfDay(9, 7, 5)).year == 1999); assert(DateTime(Date(2010, 10, 4), TimeOfDay(0, 0, 30)).year == 2010); assert(DateTime(Date(-7, 4, 5), TimeOfDay(7, 45, 2)).year == -7);
Year of the Gregorian Calendar. Positive numbers are A.D. Non-positive are B.C.