npm install jstimestamp@latest
If you're looking for an advanced Date library please checkout: Luxon or momentjs. This library does not contain any timezone manipulation.
The library exposes a type which is basically an alias for a string, this is just for clarity while developing.
Also there are tree methods included:
- isJsTimestamp: Validates values to be a valid JsTimestamp
- toJsTimestamp: Converts Date objects to a JsTimeStamp
- stamp: Date.now but casted to a JsTimestamp
- toDate: Convert a JsTimestamp to a Date
See the Contribution guide for help about contributing to this project.
See the Changelog to see the change history.