-
Notifications
You must be signed in to change notification settings - Fork 215
Open
Description
Date/Time formatting
- There are 6 different formatters - are they all needed?
final icu.DateTimeFormatter? _dateTimeFormatter;
final icu.DateFormatter? _dateFormatter;
final icu.TimeFormatter? _timeFormatter;
late final icu.ZonedDateTimeFormatter? _zonedDateTimeFormatter;
late final icu.ZonedDateFormatter? _zonedDateFormatter;
final icu.ZonedTimeFormatter? _zonedTimeFormatter;
- There are different constructors for zoned formatters, depending on the time zone format. But the timezone is parsed using
icu.IanaParser()
- why not just get the info from there?
TimeZoneType.long => icu.ZonedDateTimeFormatter.specificLong,
TimeZoneType.short => icu.ZonedDateTimeFormatter.specificShort,
TimeZoneType.shortOffset =>
icu.ZonedDateTimeFormatter.localizedOffsetShort,
TimeZoneType.longOffset =>
icu.ZonedDateTimeFormatter.localizedOffsetLong,
TimeZoneType.shortGeneric => icu.ZonedDateTimeFormatter.genericShort,
TimeZoneType.longGeneric => icu.ZonedDateTimeFormatter.genericLong,
- The time formatter takes
alignment
andtimePrecision
arguments, how do they map to ECMA402 DateTimeFormat options? - What does
TimeFormatStyle.full
correspond to?
icu.DateTimeLength timeTo4xOptions() => switch (this) {
TimeFormatStyle.full => icu.DateTimeLength.long, //TODO: Does this match?
TimeFormatStyle.long => icu.DateTimeLength.long,
TimeFormatStyle.medium => icu.DateTimeLength.medium,
TimeFormatStyle.short => icu.DateTimeLength.short,
};
- How do I set a
Calendar
to be used?
Metadata
Metadata
Assignees
Labels
No labels