maddhruv / npmtotal

Find you npm download statistics
16 stars 0 forks source link

CLI: default date span? #1

Open ljharb opened 4 years ago

ljharb commented 4 years ago

I'd expect it to default to the last 24 hours; but it'd also be great to have an easy CLI option to select the last week, month, 3 months, 6 months, year, etc under, say, --duration=

Also, perhaps --start-date= and --end-date= which are mutually exclusive with --duration=.

maddhruv commented 4 years ago

Thanks @ljharb for raising this issue. Can you help me with pointing to a library or way to enable duration as last week, month, 3 months etc. and get the Date back.

maddhruv commented 4 years ago

In 1.2.0 Added support of startDate and endDate

ljharb commented 4 years ago

I believe momentjs supports those phrases.