import { parse , format } from "date-fns" ; import { getDateFnsLocale } from "./locale" ; export param { string } timeString param { string } language returns { string } export function formatToLocaleTimeString ( timeString , language ) { return format ( parse ( timeString , "HH:mm:ss" , new Date ( ) ) , "hh:mm aa" , { locale : getDateFnsLocale ( ) , } ) ; }