Date.of constructor

Date.of(
  1. DateTime dateTime
)

Constructs a new Date instance based on dateTime.

This takes the date part of the given DateTime and discards the rest.

Implementation

Date.of(DateTime dateTime)
    : dateTime = DateTime.utc(dateTime.year, dateTime.month, dateTime.day);