当前位置:网站首页>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
边栏推荐
- In embedded system, must the program code in flash be moved to ram to run?
- 列表的使用-增删改查
- 198. 打家劫舍-动态规划
- Land cover / use data product download
- 209. Minimum length subarray - sliding window
- SystemVerilog (VI) - variable
- 470. Rand10() is implemented with rand7()
- Ring back to origin problem - byte jumping high frequency problem
- Use of five routing guards
- Double pointer advanced -- leetcode title -- container with the most water
猜你喜欢
![[appium] write scripts by designing Keyword Driven files](/img/05/536701f39dcf8474e90e58738f2094.png)
[appium] write scripts by designing Keyword Driven files

Qt error: /usr/bin/ld: cannot find -lGL: No such file or directory

Hcip fifth experiment

Why do some people say SCM is simple and I have to learn it so hard?

Future usage details

Examination question bank and online simulation examination of the third batch (main person in charge) of special operation certificate of safety officer a certificate in Guangdong Province in 2022

JVM类加载机制

Double pointer advanced -- leetcode title -- container with the most water

云原生虚拟化:基于 Kubevirt 构建边缘计算实例

开源按键组件Multi_Button的使用,含测试工程
随机推荐
402. 移掉 K 位数字-贪心
Qt 修改UI没有生效
Oil monkey website address
239. Maximum value of sliding window (difficult) - one-way queue, large top heap - byte skipping high frequency problem
How to use the input table one-way service to send (occupy less) picture files (body transmission)? FileReader built-in object involved
JS implementation private attribute
SiteServer CMS5. 0 Usage Summary
双闭环直流调速系统matlab/simulink仿真
2022年茶艺师(初级)考试模拟100题及模拟考试
Applet learning notes (I)
Why do some people say SCM is simple and I have to learn it so hard?
Add animation to the picture under V-for timing
Hcip fifth experiment
Land cover / use data product download
386. Dictionary order (medium) - iteration - full arrangement
读《Software Engineering at Google》(15)
48. 旋转图像
Element calculation distance and event object
双指针进阶--leetcode题目--盛最多水的容器
Entity Framework core captures database changes