Convert to a DateTime.
DateTime toDateTime({bool utc = false}) { if (utc) { return DateTime.utc(year, month, day); } else { return DateTime(year, month, day); } }