date.helper
library
Functions
-
convertMonthsToYearsAndMonths(int months)
→ Map<String, int>
-
-
createDateFormatter(String locale, bool showTime, bool use24HourFormat)
→ DateFormat
-
Creates a date formatter based on the locale and preferences.
-
formatDateTime(DateTime dateTime, {bool use24HourFormat = false, String languageCode = 'en', bool showTime = true, String? countryCode})
→ Future<String>
-
Formats a DateTime object into a string.
-
formatTimestampInMilliseconds({required int timestamp, bool use24HourFormat = false, String languageCode = 'en', bool showTime = true, String? countryCode, bool isUtc = false})
→ Future<String>
-
Formats a timestamp in milliseconds since epoch into a date string.
-
retrieveDateFormatter({bool use24HourFormat = false, String languageCode = 'en', bool showTime = true, String? countryCode})
→ Future<DateFormat>
-
Retrieves a
DateFormat
object based on locale and preferences.