import { FrontendLocaleData , TimeFormat } from "../types" ; param locale returns export const useAmPm = ( locale ) : boolean => { if ( locale . time_format === TimeFormat . language || locale . time_format === TimeFormat . system ) { const testLanguage = locale . time_format === TimeFormat . language ? locale . language : undefined ; const test = new Date ( ) . toLocaleString ( testLanguage ) ; return test . includes ( "AM" ) || test . includes ( "PM" ) ; } return locale . time_format === TimeFormat . am_pm ; } ;