DIsplaying Date in custom format -Flutter

Issue

What’s the best way to display current date on flutter using the following format example :

October 25,Monday

Solution

Definetely

 DateFormat('MMMM d,EEEE').format(DateTime.now())

But make sure you also import the following

import 'package:intl/intl.dart';

Answered By – esentis

Answer Checked By – Marilyn (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published.