简体   繁体   English

使用 javascript/moment 将日期格式化为所需格式

[英]format date as desired format using javascript/moment

I need the data as Jun 1st, 2021. I need to use this in react.我需要 2021 年 6 月 1 日的数据。我需要在反应中使用它。 Could some one help how to get in this format using moment/javascript.有人可以帮助如何使用 moment/javascript 获得这种格式。

with moment you can use this - moment().format('MMM Do, YYYY');时刻你可以使用这个 - moment().format('MMM Do, YYYY');

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM