日期时间插件Date-Utils

原文 https://segmentfault.com/a/1190000003777624
官方: https://github.com/JerrySievert/date-utils

安装
<script type="text/javascript" src="date-utils.min.js"></script>

全选复制放进笔记Class: Date
Date
new Date()
Methods
<static> compare(date1, date2) → {Number}
<static> equals(date1, date2) → {Boolean}
<static> equalsDay(date1, date2) → {Boolean}
<static> getDayNumberFromName(day) → {Number}
<static> getDaysInMonth(year, month) → {Number}
<static> getMonthAbbrNameFromNumber(month) → {String}
<static> getMonthNameFromNumber(month) → {String}
<static> getMonthNumberFromName(month) → {Number}
<static> isLeapYear(year) → {Boolean}
<static> today() → {Date}
<static> tomorrow() → {Date}
<static> UTCtoday() → {Date}
<static> UTCtomorrow() → {Date}
<static> UTCyesterday() → {Date}
<static> validateDay(day, year, month) → {Boolean}
<static> validateHour(hour) → {Boolean}
<static> validateMillisecond(millisecond) → {Boolean}
<static> validateMinute(minute) → {Boolean}
<static> validateMonth(month) → {Boolean}
<static> validateSecond(second) → {Boolean}
<static> validateYear(year) → {Boolean}
<static> yesterday() → {Date}
add(additions) → {Date}
addHours(hours) → {Date}
addMilliseconds(milliseconds) → {Date}
addMinutes(minutes) → {Date}
addMonths(months) → {Date}
addSeconds(seconds) → {Date}
addSeconds(days) → {Date}
addWeekdays(weekdays) → {Date}
addWeeks(weeks) → {Date}
addYears(years) → {Date}
between() → {Boolean}
clearTime() → {Date}
clearUTCTime() → {Date}
clone()
compareTo(Date) → {Number}
equals(Date) → {Boolean}
equalsDay(Date) → {Boolean}
getDaysBetween(Date) → {Number}
getFullWeekNumber() → {Number}
getHoursBetween(Date) → {Number}
getLastMonthName() → {String}
getMillisecondsBetween(Date) → {Number}
getMinutesBetween(Date) → {Number}
getMonthAbbr() → {String}
getMonthName() → {String}
getMonthsBetween(Date) → {Number}
getOrdinalNumber() → {Number}
getSecondsBetween(Date) → {Number}
getUTCOffset() → {String}
getWeekNumber() → {Number}
isAfter(Date) → {Boolean}
isBefore(Date) → {Boolean}
isToday() → {Boolean}
isWeekend() → {Boolean}
remove(removals) → {Date}
removeDays(days) → {Date}
removeHours(hours) → {Date}
removeMilliseconds(milliseconds) → {Date}
removeMinutes(seconds) → {Date}
removeMonths(months) → {Date}
removeSeconds(seconds) → {Date}
removeWeeks(weeks) → {Date}
removeYears(years) → {Date}
setTimeToNow()
toCLFString() → {String}
toDBString() → {String}
toFormat(format) → {String}
toUTCFormat(format) → {String}
toYMD(separator) → {String}

你可能感兴趣的:(日期时间插件Date-Utils)