当前位置:网站首页>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
边栏推荐
- Halo 开源项目学习(二):实体类与数据表
- Kubernetes 服务发现 监控Endpoints
- Write a regular
- Land cover / use data product download
- 开源按键组件Multi_Button的使用,含测试工程
- 239. 滑动窗口最大值(困难)-单向队列、大顶堆-字节跳动高频题
- [appium] write scripts by designing Keyword Driven files
- Uniapp custom search box adaptation applet alignment capsule
- Utilisation de la liste - Ajouter, supprimer et modifier la requête
- Future 用法详解
猜你喜欢
Dry goods | how to extract thumbnails quickly?
索引:手把手教你索引从零基础到精通使用
Element calculation distance and event object
MySQL进阶之索引【分类,性能分析,使用,设计原则】
2022年广东省安全员A证第三批(主要负责人)特种作业证考试题库及在线模拟考试
常用SQL语句总结
Chrome浏览器的跨域设置----包含新老版本两种设置
[ES6] promise related (event loop, macro / micro task, promise, await / await)
干货 | 快速抽取缩略图是怎么练成的?
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
随机推荐
Tdan over half
How to use the input table one-way service to send (occupy less) picture files (body transmission)? FileReader built-in object involved
Manually implement simple promise and its basic functions
Land cover / use data product download
Kubernetes service discovery monitoring endpoints
SystemVerilog(六)-变量
[ES6] promise related (event loop, macro / micro task, promise, await / await)
48. 旋转图像
Listen for click events other than an element
In ancient Egypt and Greece, what base system was used in mathematics
开源按键组件Multi_Button的使用,含测试工程
239. Maximum value of sliding window (difficult) - one-way queue, large top heap - byte skipping high frequency problem
Chrome浏览器的跨域设置----包含新老版本两种设置
SystemVerilog (VI) - variable
一些问题一些问题一些问题一些问题
Entity Framework core captures database changes
This point in JS
Future usage details
MySQL进阶学习之SQL优化【插入,主键,排序,分组,分页,计数】
ES6 new method