initializeDatePatterns function
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.
Implementation
void initializeDatePatterns(Function patterns) {
if (dateTimePatterns is UninitializedLocaleData<dynamic>) {
dateTimePatterns = patterns();
}
}