DateTime constructor

DateTime(int year, [ int month = 1, int day = 1, int hour = 0, int minute = 0, int second = 0, int millisecond = 0, int microsecond = 0 ])

Constructs a DateTime instance specified in the local time zone.

For example, to create a new DateTime object representing April 29, 2014, 6:04am:

DateTime annularEclipse = new DateTime(2014, DateTime.APRIL, 29, 6, 4);

Source

DateTime(int year,
    [int month = 1,
    int day = 1,
    int hour = 0,
    int minute = 0,
    int second = 0,
    int millisecond = 0,
    int microsecond = 0])
    : this._internal(year, month, day, hour, minute, second, millisecond,
          microsecond, false);

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-core/DateTime/DateTime.html