当前位置:网站首页>指定格式时间,月份天数前补零
指定格式时间,月份天数前补零
2022-07-06 09:28:00 【梦想身高1米8】
antd DatePicker选中的时间,可以用format格式化:
https://blog.csdn.net/weixin_43915401/article/details/112880693
js获取时间方法:
https://blog.csdn.net/weixin_43915401/article/details/114014926
js生成指定格式的时间,只能自己拼,就。。。补充一下,填充字符串的方法吧。padStart(2,'0')2位字符串,不足两位的,在前面补零。
let date = new Date();
YYYY-MM-DD = date.getFullYear() + '-'
+ (date.getMonth() + 1).toString().padStart(2, '0') + '-'
+ (date.getDate()).toString().padStart(2, '0');
边栏推荐
- Essai de pénétration (1) - - outils nécessaires, navigation
- MySQL import database error [err] 1273 - unknown collation: 'utf8mb4_ 0900_ ai_ ci’
- 渗透测试 ( 5 ) --- 扫描之王 nmap、渗透测试工具实战技巧合集
- QNetworkAccessManager实现ftp功能总结
- Perform general operations on iptables
- 1689. Ten - the minimum number of binary numbers
- Sanic异步框架真的这么强吗?实践中找真理
- Programmers, what are your skills in code writing?
- HDU - 6024 building shops (girls' competition)
- QWidget代码设置样式表探讨
猜你喜欢

Penetration test (3) -- Metasploit framework (MSF)

Codeforces Round #801 (Div. 2)A~C

第 300 场周赛 - 力扣(LeetCode)

Differential (one-dimensional, two-dimensional, three-dimensional) Blue Bridge Cup three body attack

1529. Minimum number of suffix flips
快速转 TypeScript 指南

QT实现窗口渐变消失QPropertyAnimation+进度条

Information security - threat detection engine - common rule engine base performance comparison

Penetration test (7) -- vulnerability scanning tool Nessus

力扣——第298场周赛
随机推荐
Interesting drink
Information security - Epic vulnerability log4j vulnerability mechanism and preventive measures
Penetration test (4) -- detailed explanation of meterpreter command
滲透測試 ( 1 ) --- 必備 工具、導航
Sanic异步框架真的这么强吗?实践中找真理
[exercise-6] (UVA 725) division = = violence
Information security - security professional name | CVE | rce | POC | Vul | 0day
树莓派4B安装opencv3.4.0
【练习-10】 Unread Messages(未读消息)
日期加1天
Codeforces Round #801 (Div. 2)A~C
628. Maximum product of three numbers
Shell Scripting
Penetration test 2 --- XSS, CSRF, file upload, file inclusion, deserialization vulnerability
[exercise-7] crossover answers
Truck History
B - Code Party (girls' competition)
【练习-5】(Uva 839)Not so Mobile(天平)
Codeforces Round #798 (Div. 2)A~D
渗透测试 ( 5 ) --- 扫描之王 nmap、渗透测试工具实战技巧合集