any-to-luxon
v2.0.0
Published
Converts various representations usually found in databases to luxon DateTime objects.
Downloads
45
Maintainers
Readme
any-to-luxon.dateTimeify()
takes any value and tries to parse
it into a luxon DateTime
object.
If parsing fails, it returns the unchanged value. It is optimized for usage with data returnt by databases. First usecase was data in Google Cloud Datastore where every generation of client libraries messes up date objects in new and interesting ways.
any-to-luxon tries to follow modern (ES2020 etc.) practices and is Typescript and ESM friendly. No monkey-patching of built-in prototypes.