import core.time; import std.datetime.date : DateTime; auto st = SysTime(DateTime(0, 1, 1, 12, 0, 0)); st.dayOfGregorianCal = 1; assert(st == SysTime(DateTime(1, 1, 1, 12, 0, 0))); st.dayOfGregorianCal = 365; assert(st == SysTime(DateTime(1, 12, 31, 12, 0, 0))); st.dayOfGregorianCal = 366; assert(st == SysTime(DateTime(2, 1, 1, 12, 0, 0))); st.dayOfGregorianCal = 0; assert(st == SysTime(DateTime(0, 12, 31, 12, 0, 0))); st.dayOfGregorianCal = -365; assert(st == SysTime(DateTime(-0, 1, 1, 12, 0, 0))); st.dayOfGregorianCal = -366; assert(st == SysTime(DateTime(-1, 12, 31, 12, 0, 0))); st.dayOfGregorianCal = 730_120; assert(st == SysTime(DateTime(2000, 1, 1, 12, 0, 0))); st.dayOfGregorianCal = 734_137; assert(st == SysTime(DateTime(2010, 12, 31, 12, 0, 0)));
The Xth day of the Gregorian Calendar that this SysTime is on. Setting this property does not affect the time portion of SysTime.