Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
🚀 Flutter_Extend Version 0.3.0 is now live! See our changelog for details.
Convert DateTime objects to human-readable ‘time ago’ strings and localized formats, including short month names and ISO week numbers.
final past = DateTime.now().subtract(const Duration(hours: 3)); print(past.timeAgo()); // "3 hours ago"
final future = DateTime.now().add(const Duration(hours: 5)); print(future.timeUntil()); // "in 5 hours"
print(DateTime(2025, 12, 31).slashedDate()); // "31/12/2025"
intl
print(DateTime(2025, 12, 1).monthName()); // "December"
print(DateTime(2025, 12, 1).monthNameShort()); // "Dec"
print(DateTime(2025, 12, 1).dayName()); // "Monday"
print(DateTime(2025, 12, 1).dayNameShort()); // "Mon"
// January 1st is typically Week 1 print(DateTime(2025, 1, 1).weekNumber()); // 1
Was this page helpful?