当前位置:网站首页>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
边栏推荐
- 圆环回原点问题-字节跳动高频题
- 198. Looting - Dynamic Planning
- 为什么有些人说单片机简单,我学起来这么吃力?
- Qt 修改UI没有生效
- SystemVerilog(六)-变量
- Learning record of uni app dark horse yougou project (Part 2)
- SystemVerilog (VI) - variable
- 古代埃及希腊,数学用的什么进制
- How to manually implement the mechanism of triggering garbage collection in node
- Summary of common SQL statements
猜你喜欢
开源按键组件Multi_Button的使用,含测试工程
On the method of outputting the complete name of typeID from GCC
干货 | 快速抽取缩略图是怎么练成的?
stm32入门开发板选野火还是正点原子呢?
[ES6] promise related (event loop, macro / micro task, promise, await / await)
嵌入式系统中,FLASH中的程序代码必须搬到RAM中运行吗?
2022年茶艺师(初级)考试模拟100题及模拟考试
Matlab / Simulink simulation of double closed loop DC speed regulation system
云原生虚拟化:基于 Kubevirt 构建边缘计算实例
SystemVerilog (VI) - variable
随机推荐
Tell the truth of TS
编译原理 求first集 follow集 select集预测分析表 判断符号串是否符合文法定义(有源码!!!)
102. 二叉树的层序遍历
Halo 开源项目学习(二):实体类与数据表
Summary of common server error codes
JS get link? The following parameter name or value, according to the URL? Judge the parameters after
PC电脑使用无线网卡连接上手机热点,为什么不能上网
402. Remove K digits - greedy
402. 移掉 K 位数字-贪心
Utilisation de la liste - Ajouter, supprimer et modifier la requête
239. Maximum value of sliding window (difficult) - one-way queue, large top heap - byte skipping high frequency problem
209. 长度最小的子数组-滑动窗口
Write a regular
Detailed deployment of flask project
Qt 修改UI没有生效
Advantages and disadvantages of several note taking software
Chrome浏览器的跨域设置----包含新老版本两种设置
Sword finger offer 03 Duplicate number in array
Hcip fifth experiment
The system cannot be started after AHCI is enabled