I have some timestamps that have resolution down to nanoseconds. I would like to be able to parse the timestamps and create Javascript Date objects (or some extension thereof) so they can be sorted/added/subtracted, etc. ... But it appears the Javascript Date object does not go beyond milliseconds.
Is there a way to extend the Date object to store the extra precision? I've looked for existing libraries that do this but haven't located any so far.
To be clear I don't need to get nanoseconds from Date.now() ... I just to be able to parse timestamp strings into objects that have the necessary precision.
JS environment is the browser (not Node.js).
Aucun commentaire:
Enregistrer un commentaire