Date.toMap
$date.toMap() -> map
Description
Get a map of date/time information from a Date object
$date = Date.create('2033-03-31 13:21:45') $date.toMap() //= { // day: 31 // dayName: 'Thursday' // dayNameShort: 'Thu' // dayOfWeek: 4 // dayOfYear: 89 // hour: 13 // minute: 21 // month: 3 // monthName: 'March' // monthNameShort: 'Mar' // second: 45 // year: 2033 // }