UNPKG

@freshworks/crayons

Version:
1 lines 712 B
import{r as registerInstance}from"./index-25bc21e4.js";import{f as formatDate}from"./format-date-util-cbbbafe3.js";var FormatDate=function(){function t(t){registerInstance(this,t);this.date=new Date;this.hourFormat="auto"}t.prototype.render=function(){var t=new Date(this.date);var e=this.hourFormat==="auto"?undefined:this.hourFormat==="12";if(isNaN(t.getMilliseconds())){console.error("Invalid date "+this.date);return}{return formatDate({date:t,locale:this.locale,options:{weekday:this.weekday,year:this.year,month:this.month,day:this.day,hour:this.hour,minute:this.minute,second:this.second,timeZoneName:this.timeZoneName,timeZone:this.timeZone,hour12:e}})}};return t}();export{FormatDate as fw_format_date};