import 'package:intl/intl.dart';

extension DateTimeExtension on DateTime {
  String toAppDateFormat() {
    DateFormat df = DateFormat('dd MMM yyyy', 'th_TH');

    return df.format(this);
  }

  String toAppFullDateFormat() {
    DateFormat df = DateFormat('dd MMMM yyyy', 'th_TH');

    return df.format(this);
  }

  String toFormat(String format) {
    DateFormat df = DateFormat(format, 'th_TH');

    return df.format(this);
  }
}
