setDay method

DateTime setDay(
  1. int day, [
  2. int? hour,
  3. int? minute,
  4. int? second,
  5. int? millisecond,
  6. int? microsecond,
])

Change day of this date

set hour if you want to change it as well, to skip an change other optional field set it as null set minute if you want to change it as well, to skip an change other optional field set it as null set second if you want to change it as well, to skip an change other optional field set it as null set millisecond if you want to change it as well, to skip an change other optional field set it as null set microsecond if you want to change it as well

Implementation

DateTime setDay(
  int day, [
  int? hour,
  int? minute,
  int? second,
  int? millisecond,
  int? microsecond,
]) =>
    DateTime(
      year,
      month,
      day,
      hour ?? this.hour,
      minute ?? this.minute,
      second ?? this.second,
      millisecond ?? this.millisecond,
      microsecond ?? this.microsecond,
    );