LocalDate.fromDateTime constructor

LocalDate.fromDateTime(
  1. DateTime date
)

Creates a new LocalDate from the year, month and day properties of the given DateTime.

Note: Any time component of the DateTime is ignored.

Implementation

LocalDate.fromDateTime(DateTime date)
    : _date = DateTime.utc(date.year, date.month, date.day);