toAtcDateString method

String toAtcDateString({
  1. bool atcFormat = true,
  2. bool withSeparators = true,
  3. String separator = "/",
})

Implementation

String toAtcDateString(
    {bool atcFormat = true,
    bool withSeparators = true,
    String separator = "/"}) {
  if (atcFormat) {
    return DateFormat('yyyy${separator}MM${separator}dd').format(this);
  }

  //else
  return DateFormat('dd${separator}MM${separator}yyyy').format(this);
}