getFormatedDateForEvent method

String getFormatedDateForEvent(
  1. dynamic dateToFormat, {
  2. String? otherCondiation,
  3. String? otherString,
})

Implementation

String getFormatedDateForEvent(dateToFormat,
    {String? otherCondiation, String? otherString}) {
  return DateFormat("dd${otherCondiation ?? " "}MMM ${otherString ?? ""}")
      .format(DateFormat("yyyy-MM-dd hh:mm:ss")
          .parse(dateToFormat.toString().replaceAll("T", " ")));
}