1.1.5 • Published 5 years ago

daterange-difference v1.1.5

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

daterange difference

descripation

daterange difference calculate

usage

// 使用了babel转义`import`语法后:[use babel transform `import` synax]
import dateDiff from 'daterange-difference'
// 在node环境中使用:[use in node env]
const dateDiff = require('daterange-difference').default

const result = dateDiff('2020-01-01', '2021-02-28')

// output:
// {
//    years: 1,
//    months: 2,
//    days: 0,
//    weeks: 60,
//    totalDay: 425,
//    totalMonth: 14,
//    totalYear: 1
// }

dateDiff method defaultly is include lastDay, but has third parameter is Object 'opts', setting includeLastDay is false, to result is not include lastDay.

1.1.5

5 years ago

1.1.4

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago