📌  相关文章
📜  用单词月份反应日期组件 - Javascript代码示例

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

代码示例1
// Single-File-Component for React 
// Displays month as a word - format: December 31, 2021
export default function currentDate() {
  const current = new Date();

  const month = current.toLocaleString("default", { month: "long" });
  const date = `${month} ${current.getDate()}, ${current.getFullYear()}`;

  return {date};
}