当前位置:网站首页>Tue Jun 28 2022 15:30:29 GMT+0800 (中国标准时间) 日期格式化
Tue Jun 28 2022 15:30:29 GMT+0800 (中国标准时间) 日期格式化
2022-06-30 07:22:00 【蓝胖子的多啦A梦】
1、 Tue Jun 28 2022 15:30:29 GMT+0800 (中国标准时间) 转换为 2022-06-28 15:30:29
代码如下
const d = new Date(Tue Jun 28 2022 15:30:29 GMT+0800 (中国标准时间))
const resDate = d.getFullYear() + '-' + this.p((d.getMonth() + 1)) + '-' + this.p(d.getDate())
const resTime = this.p(d.getHours()) + ':' + this.p(d.getMinutes()) + ':' + this.p(d.getSeconds())
p为不够10添加0的函数
p(s) {
return s < 10 ? '0' + s : s
},
2、 2022-06-28 15:30:29转换为 Tue Jun 28 2022 15:30:29 GMT+0800 (中国标准时间)
代码如下
parserDate(date) {
var t = Date.parse(date)
if (!isNaN(t)) {
return new Date(Date.parse(date.replace(/-/g, '/')))
}
},
边栏推荐
- C51 minimum system board infrared remote control LED light on and off
- 1、 Output debugging information: makefile file debugging information $(warning "tests" $(mkfile\u path)); makefile file path
- Armv8 (coretex-a53) debugging based on openocd and ft2232h
- 深度学习——语言模型和序列生成
- 期末复习-PHP学习笔记1
- DXP software uses shortcut keys
- Commands and permissions for directories and files
- Multi whale capital: report on China's education intelligent hardware industry in 2022
- Arm debug interface (adiv5) analysis (I) introduction and implementation [continuous update]
- Is it safe to open a stock account by mobile phone? What do I need to prepare for opening an account?
猜你喜欢

Efga design open source framework openlane series (I) development environment construction

Processes, jobs, and services
![January 23, 2022 [reading notes] - bioinformatics and functional genomics (Chapter 6: multiple sequence alignment)](/img/48/cfe6ab95b4d4660e3ac3d84ae5303b.jpg)
January 23, 2022 [reading notes] - bioinformatics and functional genomics (Chapter 6: multiple sequence alignment)

Analysys analysis: online audio content consumption market analysis 2022

Account command and account authority

深度学习——序列模型and数学符号

Examen final - notes d'apprentissage PHP 5 - Tableau PHP

Minecraft 1.16.5 module development (50) guide book

Commands and permissions for directories and files

期末复习-PHP学习笔记2-PHP语言基础
随机推荐
Dynamic memory management
Basic knowledge of compiling learning records
right four steps of SEIF SLAM
Label the picture below the uniapp picture
2021.11.20 [reading notes] | differential variable splicing events and DTU analysis
Implementation of binary search in C language
Self study notes -- use of 74h573
National technology n32g45x series about timer timing cycle calculation
Permutation and combination of probability
Analysys analysis: online audio content consumption market analysis 2022
C language implementation of chain stack (without leading node)
Cadence physical library lef file syntax learning [continuous update]
Introduction notes to pytorch deep learning (XII) neural network - nonlinear activation
Application of stack -- using stack to realize bracket matching (C language implementation)
February 14, 2022 [reading notes] - life science based on deep learning Chapter 2 Introduction to deep learning (Part 1)
342 maps covering exquisite knowledge, one of which is classic and pasted on the wall
Parameter calculation of deep learning convolution neural network
Xiashuo think tank: 125 planet updates reported today (packed with 101 meta universe collections)
Final review -php learning notes 8-mysql database
String application -- string violent matching (implemented in C language)