当前位置:网站首页>Timestamp to formatted date
Timestamp to formatted date
2022-04-23 17:47:00 【Sanxiaochi 513】
Define a global filter :
Vue.filter('dataFormat',function(originVal){
const dt = new Date(originVal)
const y = dt.getFullYear()
const m = (dt.getMonth() + 1 + '').padStart(2,'0')
const d = (dt.getDate() + '').padStart(2,'0')
const hh = (dt.getHours() + '').padStart(2,'0')
const mm = (dt.getMinutes() + '').padStart(2,'0')
const ss = (dt.getSeconds() + '').padStart(2,'0')
return `${y}-${m}-${d} ${hh}:${mm}:${ss}`
})
版权声明
本文为[Sanxiaochi 513]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230550325391.html
边栏推荐
- Qt error: /usr/bin/ld: cannot find -lGL: No such file or directory
- 386. 字典序排数(中等)-迭代-全排列
- 关于gcc输出typeid完整名的方法
- 古代埃及希腊,数学用的什么进制
- Uniapp custom search box adaptation applet alignment capsule
- Leak detection and vacancy filling (VIII)
- Chrome浏览器的跨域设置----包含新老版本两种设置
- 2022年茶艺师(初级)考试模拟100题及模拟考试
- JVM类加载机制
- In JS, t, = > Analysis of
猜你喜欢
470. Rand10() is implemented with rand7()
PC uses wireless network card to connect to mobile phone hotspot. Why can't you surf the Internet
MySQL installation
C1小笔记【任务训练篇一】
Matlab / Simulink simulation of double closed loop DC speed regulation system
Future 用法详解
Comparison between xtask and kotlin coroutine
Dry goods | how to extract thumbnails quickly?
Use of five routing guards
Summary of common SQL statements
随机推荐
31. Next arrangement
239. Maximum value of sliding window (difficult) - one-way queue, large top heap - byte skipping high frequency problem
剑指 Offer 22. 链表中倒数第k个节点-快慢指针
Dry goods | how to extract thumbnails quickly?
Add animation to the picture under V-for timing
JVM class loading mechanism
Detailed deployment of flask project
Construction of functions in C language programming
1217_使用SCons生成目标文件
Future usage details
48. 旋转图像
Matlab / Simulink simulation of double closed loop DC speed regulation system
2022年上海市安全员C证操作证考试题库及模拟考试
极致体验,揭晓抖音背后的音视频技术
嵌入式系统中,FLASH中的程序代码必须搬到RAM中运行吗?
Use of five routing guards
高德地图搜索、拖拽 查询地址
Qt error: /usr/bin/ld: cannot find -lGL: No such file or directory
剑指 Offer 03. 数组中重复的数字
JS implementation private attribute