Jquery时间对象的格式化
来源:互联网 发布:it公司 知乎 编辑:程序博客网 时间:2024/05/17 22:54
- /**
- * 时间对象的格式化;
- */
- Date.prototype.format = function(format) {
- /*
- * eg:format="yyyy-MM-dd hh:mm:ss";
- */
- var o = {
- "M+" : this.getMonth() + 1,// month
- "d+" : this.getDate(),// day
- "h+" : this.getHours(),// hour
- "m+" : this.getMinutes(),// minute
- "s+" : this.getSeconds(),// second
- "q+" : Math.floor((this.getMonth() + 3) / 3),// quarter
- "S" : this.getMilliseconds()
- // millisecond
- }
- if (/(y+)/.test(format)) {
- format = format.replace(RegExp.$1, (this.getFullYear() +"").substr(4
- - RegExp.$1.length));
- }
- for (var kin o) {
- if (new RegExp("(" + k +")").test(format)) {
- format = format.replace(RegExp.$1, RegExp.$1.length == 1
- ? o[k]
- : ("00" + o[k]).substr(("" + o[k]).length));
- }
- }
- return format;
- }
- Jquery时间对象的格式化
- 时间对象的格式化
- 时间对象的格式化
- 时间对象的格式化
- Jquery格式化日期时间
- jquery时间格式化插件
- Jquery 时间类型格式化
- jquery时间格式化
- jquery 时间格式化
- Jquery时间格式化以及对时间的加减
- jquery easyui datebox 时间格式化
- Jquery时间格式化,计算时间差
- jQuery获取格式化当前时间
- 扩展jquery插件--格式化时间
- jQuery格式化时间(使用了前台的一套框架)
- 如何格式化JSON时间对象
- javascript下Date对象的时间格式化函数
- javascript下Date对象的时间格式化函数
- poj 1422 最小路径覆盖
- 关于Windows消息的发送和接收入门
- 工程师们,不要想一辈子靠技术混饭吃!
- CRITICAL_SECTION
- 关于configure中build,target,host中的若干问题
- Jquery时间对象的格式化
- AS3多线程快速入门(一):Hello World[译]
- 国外经典网页设计:50个优秀的移动网站设计实例
- 如何在Django中接收JSON格式的数据。
- 详解C中volatile关键字
- OpenCV笔记
- Java String类型数据的字节长度
- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks
- Mac电脑与PC的九大区别