jsutils-ext
v1.0.1
Published
js 工具类/日期时间、LocalStorage等...
Downloads
18
Maintainers
Readme
jsutils-ext
纯 js 的工具类,包含了日期时间、LocalStorage、LocationHref 等等...
npm i jsutils-ext -s
import { FormatDate } from "jsutils-ext"
// 日期格式化
FormatDate.date(new Date()) // 2019-09-30
// 日期时间格式化
FormatDate.dateTimes(new Date(), "/") // 2019/09/30 14:23:56
// 获取【今天】前一天日期
FormatDate.dateAfter(new Date()) // 29
API
| 方法 | 说明 | | ------------ | --------------------------------------- | | FormatDate | 日期/时间格式化 | | LocalStorage | 获取/存储/删除 LocalStorage 中数据 | | LocationHref | 回去浏览器地址栏,href 地址?号后面参数 |
说明:如何出现报错,请检查版本是否正确。