keep it simple stupid date library
Please ★ this repo if you found it useful ★ ★ ★
I created kiss-date to provide a simple way to manipulate dates and timezones using simple math. The date is
stored as a tuple (array) containing a unix timestamp and timezone offset in seconds. Adjusting the timezone is as
simple as adding the unix timezone with the timezone offset dateArray[0] + dateArray[1]
.
- supports timezone manipulation
npm install --save kiss-date
import KissDate from 'kiss-date';
const date = new KissDate(new Date(), '-06:00');
console.log(date.dateArray); // [1610926376, -21600]
date.changeTimezone('+00:00');
console.log(date.dateArray); // [1610926376, 0]
Submit an issue
Contribute a screenshot
Review the guidelines for contributing
Clay Risser © 2021
Review the changelog
- Clay Risser - Author
A ridiculous amount of coffee ☕ ☕ ☕ was consumed in the process of building this project.
Add some fuel if you'd like to keep me going!