Result | Editable Javascript Code ... in addition to ... var d = new Date(); var timedatenow = new Date(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), d.getUTCMilliseconds()); | Process |
---|---|---|
var options = {year: "2-digit", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", timeZoneName: "short"}; var americandatetime = new Intl.DateTimeFormat("en-US",options).format; if (1 == 11) { alert(americandatetime(timedatenow)); } | ||
var poptions = {year: "numeric", month: "long", day: "numeric", hour: "2-digit", minute: "2-digit", timeZoneName: "short", timeZone: "UTC"}; var portuguesetime = new Intl.DateTimeFormat(["pt-BR", "pt-PT"], poptions); if (1 == 11) { alert(portuguesetime.format(timedatenow)); } | ||
var swisslocales = ["de-CH", "fr-CH", "it-CH", "rm-CH"]; var soptions = {weekday: "short", hour: "numeric", minute: "numeric", timeZone: "UTC", timeZoneName: "short"}; var swisstime = new Intl.DateTimeFormat(swisslocales, soptions).format; if (1 == 11) { alert(swisstime(timedatenow)); } | ||
var jpyearera = new Intl.DateTimeFormat("ja-JP-u-ca-japanese", {year: "numeric", era: "long"}); if (1 == 11) { alert(jpyearera.format(timedatenow)); } | ||
var toptions = {year: "numeric", month: "long", day: "numeric"}; var thaidate = new Intl.DateTimeFormat("th-TH-u-nu-thai-ca-chinese", toptions); if (1 == 11) { alert(thaidate.format(timedatenow)); } |