npmtotal icon indicating copy to clipboard operation
npmtotal copied to clipboard

CLI: default date span?

Open ljharb opened this issue 5 years ago • 3 comments

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=.

ljharb avatar Jan 22 '20 05:01 ljharb

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 avatar Jan 25 '20 11:01 maddhruv

In 1.2.0 Added support of startDate and endDate

maddhruv avatar Jan 25 '20 12:01 maddhruv

I believe momentjs supports those phrases.

ljharb avatar Jan 25 '20 21:01 ljharb