Gregorian.fromDateTime constructor

Gregorian.fromDateTime(
  1. DateTime dateTime
)

Create a Gregorian date by using DateTime object

Implementation

factory Gregorian.fromDateTime(DateTime dateTime) {
  return Gregorian(
    dateTime.year,
    dateTime.month,
    dateTime.day,
    dateTime.hour,
    dateTime.minute,
    dateTime.second,
    dateTime.millisecond,
  );
}