livestampjs icon indicating copy to clipboard operation
livestampjs copied to clipboard

Be smart about timestamps provided in milliseconds vs seconds

Open mattbradley opened this issue 9 years ago • 0 comments

Currently Livestamp only accepts timestamps in seconds, even though the native JS Date object provides Unix timestamps in milliseconds. I don't think it would be too difficult to accept both seconds or milliseconds in the data-livestamp attribute and dynamically determine the unit based on how high the number is. No one is making Livestamps for dates thousands of years in the future, so those big numbers can obviously be assumed to be in milliseconds instead of seconds.

mattbradley avatar Apr 28 '15 21:04 mattbradley