|
@@ -53,26 +53,6 @@ function getQueryString(name) {
|
|
return context == null || context == "" || context == "undefined" ? "" : context;
|
|
return context == null || context == "" || context == "undefined" ? "" : context;
|
|
}
|
|
}
|
|
|
|
|
|
-function dateTime (date, fmt='yyyy年MM月dd日 hh:mm') {// 时间戳转换
|
|
|
|
- if (!date) return ''
|
|
|
|
- d = new Date(date)
|
|
|
|
- var o = {
|
|
|
|
- "M+": d.getMonth() + 1, //月份
|
|
|
|
- "d+": d.getDate(), //日
|
|
|
|
- "h+": d.getHours(), //小时
|
|
|
|
- "m+": d.getMinutes(), //分
|
|
|
|
- "s+": d.getSeconds() //秒
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- // 根据y的长度来截取年
|
|
|
|
- if (/(y+)/.test(fmt)){
|
|
|
|
- fmt = fmt.replace(RegExp.$1, (d.getFullYear() + "").substr(4 - RegExp.$1.length))
|
|
|
|
- }
|
|
|
|
- for (var k in o){
|
|
|
|
- if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)))
|
|
|
|
- }
|
|
|
|
- return fmt
|
|
|
|
-}
|
|
|
|
function dateTime (date, fmt='yyyy年MM月dd日 hh:mm') {// 时间戳转换
|
|
function dateTime (date, fmt='yyyy年MM月dd日 hh:mm') {// 时间戳转换
|
|
if (!date) return ''
|
|
if (!date) return ''
|
|
var changes = date ? String(date).replace(/-/g, '/') : ''
|
|
var changes = date ? String(date).replace(/-/g, '/') : ''
|