Skip to content

日期狗 🐶(封装一些日期的方法,之前是为了学习下怎么写一个 js 包,后半途而废了)

License

Notifications You must be signed in to change notification settings

funny-node/datedog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

datedog

a tiny library to calculate the days of two certain dates or find the date some days before / after a certain date

Build Status codecov npm npm Code Climate GitHub license

features

  • calculate the interval days between two dates
  • find the date xx days after a certain date whose default is today
  • find the date xx days before a certain date whose default is today

usage

cli

  1. npm install datedog -g
  2. datedog -h to see the usage

server

  1. npm install datedog --save
  2. const datedog = require('datedog')

broswer

  1. <script src="datedog.js"></script>
  2. use datedog as a global variable

documentation

calcDateInterval(dateFrom[, dateTo])

calcAfter(daysSince[, dateFrom])

calcBefore(daysAgo[, dateTo])

license

MIT

About

日期狗 🐶(封装一些日期的方法,之前是为了学习下怎么写一个 js 包,后半途而废了)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published