dsDate2String = function (date) { date = date instanceof Date ? date : date.Value; let year = date.getFullYear(); if (year <= 1900) { return null; } let month = date.getMonth() + 1; let day = date.getDate(); if (sLang == 'en-US') { return ((month < 10 ? '0' + month : month) + '/' + (day < 10 ? '0' + day : day) + '/' + year.toString()); } else { return ((day < 10 ? '0' + day : day) + '/' + (month < 10 ? '0' + month : month) + '/' + year.toString()); } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter