Date/time conversion: Using the fuzzy date/time parser

Introduction

The core of the Iguana Translator has very little built in support for date and time formats. Every node is treated as a string. If you try to assign a date/time of the wrong format to a date/time field in a table an error will be raised.

This is deliberate part of the minimalist design philosophy of the Translator.

However one of our rockstars has written a fuzzy date/time parser in Lua which parses just about any date. It’s very nice since it means except for a few special cases you can avoid the need to ever have to explicitly worry about converting date/time formats. Less than 300 lines of simple code that will save literally millions of dollars globally in the industry on unnecessary busy work.

Download dateparse.lua from our code repository

The source code for the fuzzy date/time matcher can be downloaded from our code repository.  To use it you should create a shared module like dateparse and then just copy-paste the code into the module.

Leave A Comment?