moment-guess icon indicating copy to clipboard operation
moment-guess copied to clipboard

Millisecond Support

Open amcdnl opened this issue 5 years ago • 3 comments
trafficstars

Would be great to have epoch and millisecond support.

amcdnl avatar Aug 04 '20 16:08 amcdnl

Hi @amcdnl , millisecond support is already in place, not solely, but when used with seconds in most commonly used time formats(try npx moment-guess -d '23:00:00.123'). With epoch, do you imply Unix timestamp? It would be great if you could elaborate with an example.

apoorv-mishra avatar Aug 04 '20 16:08 apoorv-mishra

Yeah, it would be great to have epoch (yes Unix timestamp) support, like:

:~ jallspaw$ date
Wed Jan 12 13:33:23 EST 2022
:~ jallspaw$ date '+%s'
1642012409
:~ jallspaw$ npx -q moment-guess --date "1642012409" --format strftime
ERROR: Couldn't parse date

Ideally, we'd get back a %s for that?

jallspaw avatar Jan 12 '22 18:01 jallspaw