Hi guys, I need some collaborative wisdom here. Thanks for helping in advance.
Given a MySQL column of ISO8601 periods stored as strings, is it possible to filter them by start date/time or end date/time from within MySQL?
As per ISO8601 specifications, it could omit later parts if it is the same as previous, meaning “2007-11-13T09:00/15T17:00” is actually happening for 4 days (from 11th to 15th).
The difficult case would be periods being able to do something like “2007-03-01T13:00:00Z/P1Y2M10DT2H30M” which doesn’t have the evaluated end time stored and hence requires calculation to see if it’s hitting the starting date criteria. The same goes for the period + end date case where the start date has to be evaluated before determining if it hits the end date criteria. Unfortunately MySQL does not come with something that deals with ISO8601 easily or natively.
In ideal cases this should be stored as evaluated values, but currently this is what I have to deal with before things get ideal due to 3rd party limitations. Running a round of calculation is not feasible in short term due to the amount of data accumulated from a decades-aged antique.
P.S. The table is read-only, no update operations are expected to be performed.
Any ideas?