1 line
975 B
JavaScript
1 line
975 B
JavaScript
window.VT=window.VT||{},VT.uuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=0|16*Math.random(),c="x"==a?b:8|3&b;return c.toString(16)})},VT.formatDateId=function(a){var b=a.getFullYear(),c=a.getMonth()+1,e=a.getDate();return b.toString().padStart(4,"0")+"-"+c.toString().padStart(2,"0")+"-"+e.toString().padStart(2,"0")},VT.formatDate=function(a){return VT.formatMonth(a)+" "+VT.formatDayOfMonth(a)+" "+a.getFullYear().toString().padStart(4,"0")},VT.formatDayOfMonth=function(a){var b=a.getDate(),c=b%10;return 11===b||12===b||13===b?b+"th":1===c?b+"st":2===c?b+"nd":3===c?b+"rd":b+"th"},VT.DAY_NAMES=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],VT.formatDayOfWeek=function(a){return VT.DAY_NAMES[a.getDay()]},VT.MONTH_NAMES=["January","February","March","April","May","June","July","August","September","October","November","December"],VT.formatMonth=function(a){return VT.MONTH_NAMES[a.getMonth()]}; |