toDate method
Create a new DateTime by extracting only the year and month from DateTime.
All hours, minutes, and seconds will be 0.
DateTimeから年月日のみを抽出して新しいDateTimeを作成します。
時刻分秒はすべて0になります。
Implementation
Clock toDate() {
return Clock(year, month, day);
}