@@ -790,6 +790,7 @@ function getLocaleInfo(localeNames: string | string[]): ILocale {
790790 locale . monthsShort = [ ] ;
791791 const narrow : string [ ] = [ ] ;
792792 let format : DateTimeFormat ;
793+ const fullTimeFormat = new DateTimeFormat ( normalizeLocale ( locale . name ) , { timeStyle : 'full' , timeZone : 'UTC' } ) ;
793794
794795 for ( let month = 1 ; month <= 12 ; ++ month ) {
795796 const date = Date . UTC ( 2021 , month - 1 , 1 ) ;
@@ -846,13 +847,28 @@ function getLocaleInfo(localeNames: string | string[]): ILocale {
846847 const date = Date . UTC ( 2021 , 0 , 1 , hour , 0 , 0 ) ;
847848 const value = getDatePart ( format , date , 'dayPeriod' ) ;
848849 const lcValue = value . toLowerCase ( ) ;
849-
850- hourForms . add ( value ) ;
850+ let newHourForm = value ;
851+ const newMeridiems = [ ] ;
851852
852853 if ( value === lcValue )
853- locale . meridiemAlt . push ( [ value ] ) ;
854+ newMeridiems . push ( value ) ;
854855 else
855- locale . meridiemAlt . push ( [ lcValue , value ] ) ;
856+ newMeridiems . push ( lcValue , value ) ;
857+
858+ const fullValue = getDatePart ( fullTimeFormat , date , 'dayPeriod' ) ;
859+ const lcFullValue = fullValue ?. toLowerCase ( ) ;
860+
861+ if ( fullValue && fullValue !== value ) {
862+ newHourForm += ',' + fullValue ;
863+
864+ if ( fullValue === lcFullValue )
865+ newMeridiems . push ( fullValue ) ;
866+ else
867+ newMeridiems . push ( lcFullValue , fullValue ) ;
868+ }
869+
870+ hourForms . add ( newHourForm ) ;
871+ locale . meridiemAlt . push ( newMeridiems ) ;
856872 }
857873
858874 if ( hourForms . size < 3 ) {
0 commit comments