处理Json接收日期格式问题
2024-10-19 22:38:16
//处理Json接收日期格式问题
function getNormalDate(dateNormal) {
var receiveDate = new Date(parseInt(dateNormal.replace("/Date(", "").replace(")/", ""), 10));
var month = receiveDate.getMonth() + 1 < 10 ? "0" + (receiveDate.getMonth() + 1) : receiveDate.getMonth() + 1;
var currentDate = receiveDate.getDate() < 10 ? "0" + receiveDate.getDate() : receiveDate.getDate();
var currentHour = receiveDate.getHours();
var minutes = receiveDate.getMinutes();
return receiveDate.getFullYear() + "-" + month + "-" + currentDate+" "+currentHour+":"+minutes;
}
最新文章
- 【干货分享】流程DEMO-人员调动流程
- myeclipse 无法启动 java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
- 通过Zabbix API实现对主机的增加(无主机资产的添加和带主机资产的添加)、删除、获取主机id、获取模板id、获取组id
- 20145223《信息安全系统设计基础》 GDB调试汇编堆栈过程分析
- Clone Graph leetcode java(DFS and BFS 基础)
- XPath 运算符
- 浅析字符串操作方法slice、substr、substring及其IE兼容性
- Unreal模型文件调查
- 浅谈objective—C管理内存
- ffprobe使用具体解释
- get 和 post请求的区别
- 51Nod--1012最小公倍数
- Python内置模块之subprocess
- Vue开源项目汇总(史上最全)(转)
- jdk1.8 HashMap的实现
- Cocoapods的安装和使用(2018-08-07更新)
- 学习CSS布局 - position
- c++内存管理的一些资料
- go语言之行--简介与环境搭建
- mindoc 在线文档接口系统的 docker 制作过程
热门文章
- c#的日志插件NLog基本使用
- 2015.5.21 VS2010中引用Word组件后提示 类型“Microsoft.Office.Interop.Word.ApplicationClass”未定义构造函数 解决方法
- 关于RandomizedSearchCV 和GridSearchCV(区别:参数个数的选择方式)
- 部署和调优 1.7 samba 部署和优化-1
- vsftp部署和优化错误
- [Python Study Notes]双层柱状图绘制
- Swing框架的继承关系
- cocos2d-js动作模块使用(自用,只有代码)
- oracle环境变量配置
- p3295 [SCOI2016]萌萌哒