easy-utilities

1.0.0 • Public • Published

easy-utils

介绍

基于js原生的各种utilities

软件架构

软件架构说明

安装教程

  1. xxxx
  2. xxxx
  3. xxxx

使用说明

DateUtils
  1. import {DateUtils} from 'easy-utils'
  2. 实例化,无参数时,默认对当前时间操作:
    1. new DateUtils()
    2. new DateUtils(string|number|Date)
  3. 实例方法:format(f)
    1. f:format 参见sql语法 其返回最终的字符串 即按照format返回相应的字符:如"%y-%m"=>"22-8"
    2. format等输出非this结果的均是对日期操作的最后一步,完成后需恢复至原始数据,以供下次操作
  4. 实例方法:add(interval)
    1. interval: {key:d} ,返回DateUtils实例,供继续操作
    2. interval 描述时间跨度的对象,key值可以为:'year','month','day','hour','minute','second'
    3. 值为正数是为增加,负数则为减少,无或0为不变;如{hour:-2,minute:-20}即2小时20分钟前

参与贡献

  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request

特技

  1. 使用 Readme_XXX.md 来支持不同的语言,例如 Readme_en.md, Readme_zh.md
  2. Gitee 官方博客 blog.gitee.com
  3. 你可以 https://gitee.com/explore 这个地址来了解 Gitee 上的优秀开源项目
  4. GVP 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
  5. Gitee 官方提供的使用手册 https://gitee.com/help
  6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 https://gitee.com/gitee-stars/

Package Sidebar

Install

npm i easy-utilities

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

13.2 kB

Total Files

9

Last publish

Collaborators

  • ninja008