📜  javascript strftime - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:26.380000             🧑  作者: Mango

代码示例1
Arguments of toLocaleString method can also configure the format of the dates. This is supported in modern browser versions,
you can see more information here:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString#browser_compatibility.

let date = new Date(Date.UTC(2015, 5, 27, 12, 0, 0))
, options = {weekday: 'short', month: 'short', day: 'numeric' };
console.log(date.toLocaleString('es-ES', options)); //sáb. 27 de jun.