@freshworks/crayons
Version:
Crayons Web Components library
1 lines • 413 B
JavaScript
function formatDate(e){var t=e===void 0?{date:new Date,locale:[],options:{}}:e,o=t.date,a=t.locale,n=t.options;var r=new Date(o);if(isNaN(r.getMilliseconds())){return undefined}return new Intl.DateTimeFormat(a||[],{weekday:n.weekday,year:n.year,month:n.month,day:n.day,hour:n.hour,minute:n.minute,second:n.second,timeZoneName:n.timeZoneName,timeZone:n.timeZone,hour12:n.hour12}).format(r)}export{formatDate as f};