intToDate function

DateTime intToDate(
  1. int y,
  2. int m,
  3. int d, {
  4. int h = 0,
  5. int min = 0,
})

Implementation

DateTime intToDate(int y, int m, int d, {int h = 0, int min = 0}) {
  return strToDate(
      "${y.toString().padLeft(4, "0")}/${m.toString().padLeft(2, "0")}/${d.toString().padLeft(2, "0")} ${h.toString().padLeft(2, "0")}:${min.toString().padLeft(2, "0")}",
      pattern: "yyyy/MM/dd HH:mm");
}