时间

# 方法列表

方法名 说明 返回值
$AsGetParseTime(time, pattern) 根据参数格式将时间对象转换为字符串。time为Date类型,pattern为格式如"yy-mm-dd" String类型
$AsGetTimesInterval(time) 获取时间距离现在时间的间隔,time为时间戳 String类型
$AsGetFormatSeconds(startTime,endTime) 两个事件的间隔,startTime,endTime都为时间戳 String类型
$AsGetCurrentMonthFirstStart(time) 某月第一天第一秒,time为时间戳类型 String类型
$AsGetCurrentMonthFirstEnd(time) 某月第一天最后一秒,time为时间戳类型 String类型
$AsGetCurrentMonthLastStart(time) 某月最后一天第一秒,time为时间戳类型 String类型
$AsGetCurrentMonthLastEnd(time) 某月最后一天最后一秒,time为时间戳类型 String类型
$AsGetWeekDay(Y,M) 获取某年和某月的第一天1号是周几,Y,M表示年和月,都是Number类型 Number类型
$AsGetDays(Y,M) 获取某年的某月有多少天,Y,M表示年和月,都是Number类型 Number类型

# 简单示例

let result1=this.$AsGetParseTime(time, pattern);
let result2=this.$AsGetTimesInterval(time);
let result3=this.$AsGetFormatSeconds(startTime,endTime);
let result4=this.$AsGetCurrentMonthFirstStart(time);
let result5=this.$AsGetCurrentMonthFirstEnd(time);
let result6=this.$AsGetCurrentMonthLastStart(time);
let result7=this.$AsGetCurrentMonthLastEnd(time);
let result8=this.$AsGetWeekDay(Y,M);
let result9=this.$AsGetDays(Y,M);