from static method
Convenience method that returns a DateComponents from a given DateTime
date
the date
return the DateComponents (according to the default device timezone)
Implementation
static DateComponents from(DateTime date) {
return DateComponents(date.year, date.month, date.day);
}