intl_local/lib/src/date_format_internal library
This contains internal implementation details of the date formatting code
which are exposed as public functions because they must be called by other
libraries in order to configure the source for the locale data. We don't
want them exposed as public API functions in the date formatting library, so
they are put in a separate library here. These are for internal use
only. User code should import one of the date_symbol_data...
libraries and
call the initializeDateFormatting
method exposed there.
Properties
- cachedDateSymbols ↔ DateSymbols?
-
Cache the last used symbols to reduce repeated lookups.
getter/setter pair
- dateTimePatterns ↔ dynamic
-
This holds the patterns used for date/time formatting, indexed
by locale. Note that it will be set differently during initialization,
depending on what implementation we are using. By default, it is initialized
to an instance of UninitializedLocaleData, so any attempt to use it will
result in an informative error message.
getter/setter pair
- dateTimeSymbols ↔ dynamic
-
This holds the symbols to be used for date/time formatting, indexed
by locale. Note that it will be set differently during initialization,
depending on what implementation we are using. By default, it is initialized
to an instance of UninitializedLocaleData, so any attempt to use it will
result in an informative error message.
getter/setter pair
- lastDateSymbolLocale ↔ String?
-
Which locale was last used for symbol lookup.
getter/setter pair
Functions
-
initializeDatePatterns(
Function patterns) → void - Initialize the patterns dictionary. This should be passed a function that creates and returns the pattern data. We take a function so that if initializing the data is an expensive operation it need only be done once, no matter how many times this method is called.
-
initializeDateSymbols(
Function symbols) → void - Initialize the symbols dictionary. This should be passed a function that creates and returns the symbol data. We take a function so that if initializing the data is an expensive operation it need only be done once, no matter how many times this method is called.
-
initializeIndividualLocaleDateFormatting(
Function init) → Future