A few weeks ago I went looking for Harptos Date tools, specifically for JavaScript/TypeScript to use with a project I'm working on. Unfortunately the only tools I could find were Calendar generators and libraries for other languages.
So instead, with the risk someone will point out this already exists somewhere, I've created my own library based on the MomentJS API:
This is the first opensource Typescript package I've really made, but I thought I'd share it out incase anyone would find it useful. A few features it has so far:
Date object for handling Harptos Dates
Format to a readable format using a simple YYYY-MM-DD api as MomentJS
Use locales to format your date in different ways, including using common names like Deepwinter instead of Hammer, or even January to help those less familiar with the D&D months
Accepts custom locales, use your own names for months
Handles the 5 additional days between months, like Midwinter and Greengrass, as well as leap years
Basic date calculations (more planned)
Zero production dependencies
Built using TDD with 95%+ coverage
Hope this is interest to someone, and hey if it turns out this already exists, well it was fun to make. Enjoy Midsummer at the end of this Tenday :)
Hey
A few weeks ago I went looking for Harptos Date tools, specifically for JavaScript/TypeScript to use with a project I'm working on. Unfortunately the only tools I could find were Calendar generators and libraries for other languages.
So instead, with the risk someone will point out this already exists somewhere, I've created my own library based on the MomentJS API:
https://github.com/jmosul/harptos-js
This is the first opensource Typescript package I've really made, but I thought I'd share it out incase anyone would find it useful. A few features it has so far:
Hope this is interest to someone, and hey if it turns out this already exists, well it was fun to make. Enjoy Midsummer at the end of this Tenday :)
While I don't have any use for this package at the moment, this is rad. Great job!
Thanks Kinoztic, it was fun to make!