v.21.1New Features
Added functions for converting between Proleptic Gregorian calendar and Modified Julian Day number
Added functionstoModifiedJulianDay,fromModifiedJulianDay,toModifiedJulianDayOrNull, andfromModifiedJulianDayOrNull. These functions convert between Proleptic Gregorian calendar date and Modified Julian Day number. #17750 (PHO).
Why it matters
These functions provide users with the ability to easily convert dates from the Proleptic Gregorian calendar format into Modified Julian Day numbers and vice versa. This enables more flexible date handling and interoperability with systems or datasets that use Modified Julian Day representation.How to use it
UsetoModifiedJulianDay(date) to convert a date to its Modified Julian Day number. Use fromModifiedJulianDay(number) to convert a Modified Julian Day number back to a date. The OrNull variants return NULL instead of throwing errors for invalid inputs.