Skip to main content

Tinkerings

Tardis project

Tardis

Tardis

Dates have always been my kryptonite. So many formats & standards for the many ways to work with them in every different programming language. Maddening. I have been refining my site over the last few months I’ve added a great deal of features and data. Toss in a few API’s and their mixed and matched data, things were beginning to getting sloppy. Doing a code review I noticed I was doing the same thing in 4 separate files to format dates from different sources. My first thought was to standardize the process in a function and use that as date format controller. While planning I opted to make it a module so I could use it on other projects and if I update it one place I can update it everywhere with npm. What started as a basic formatter, then grew into a standards converter and finally a full blown free form pattern mapping Time/Date formatting tool. Supporting Unix timestamps, ISO and UTC time stamps you can imput any combo and be returned in an object with multiple values in dozens of formats to use as you need. You can also use the prebuilt filters for quick standardized formats and you can even add your own masks and receive back the format of your choosing. It is available on NPM, just look for lbx-tardis.

See Site