ngx-kit 7.1.0 → 7.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -125,7 +125,6 @@ function clampYear(date, min, max) {
125
125
  return 0;
126
126
  }
127
127
 
128
- // Date and Time Patterns
129
128
  // yy = 2-digit year; yyyy = full year
130
129
  // M = digit month; MM = 2-digit month; MMM = short month name; MMMM = full month name
131
130
  // EEEE = full weekday name; EEE = short weekday name
@@ -138,6 +137,13 @@ function genFormatDate(date, pattern = 'M/d/yyyy', monthNames, dayNames) {
138
137
  if (!date) {
139
138
  return '';
140
139
  }
140
+ const namedPatterns = {
141
+ full: 'MMMM d, yyyy',
142
+ long: 'MMMM d, yyyy',
143
+ medium: 'MMM d, yyyy',
144
+ short: 'M/d/yy',
145
+ };
146
+ pattern = namedPatterns[pattern] ?? pattern;
141
147
  const day = date.day ?? 0;
142
148
  const month = date.month ?? 0;
143
149
  const year = date.year ?? 0;