DateTimeFormatterStandalone class sealed
A base class for formatters that can format a DateTime into a string.
Most formatters are DateTimeFormatters that can also format with time zone information. Only the formatters for year and month are standalone and do not support time zones, returning DateTimeFormatterStandalone.
Example:
import 'package:intl4x/datetime_format.dart';
void main() {
final date = DateTime(2021, 12, 17, 4, 0, 42);
print(DateTimeFormat.year().format(date)); // Output: '2021'
}
- Implementers
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
format(
DateTime datetime) → String -
Formats the given
datetimeinto a string according to the formatter's configured locale and options. -
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