AnasDateTimeFormatter class
Provides localized date and time formatting utilities. Uses full locale (e.g. ar_SA, ar_MA) so Arabic weekday/month names and AM/PM labels come from intl. English regional defaults: en_US and en_CA use 12-hour clock; en_GB and en_AU use 24-hour (intl).
Constructors
- AnasDateTimeFormatter(Locale locale)
-
const
Properties
Methods
-
formatCurrency(
double amount, {String? currencySymbol}) → String - Format currency with locale-specific patterns
-
formatDate(
DateTime date, {DateFormat? customFormat}) → String - Format date with localized patterns
-
formatDateTime(
DateTime dateTime) → String - Format date and time together
-
formatNumber(
num number) → String - Format numbers with locale-specific patterns
-
formatRelativeTime(
DateTime dateTime) → String - Format relative time (e.g., "2 hours ago", "yesterday")
-
formatTime(
DateTime time) → String - Format time with localized patterns
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
defaultClockIs24Hour(
Locale locale) → bool - Returns true if the locale typically uses 24-hour time. en_GB and en_AU default to 24-hour; en_US and en_CA default to 12-hour.
-
preferredDateSkeleton(
Locale locale) → String? - Returns the conventional date order skeleton for this locale.