v.21.1New Features

Added functions for converting between Proleptic Gregorian calendar and Modified Julian Day number

Added functions toModifiedJulianDay, fromModifiedJulianDay, toModifiedJulianDayOrNull, and fromModifiedJulianDayOrNull. These functions convert between Proleptic Gregorian calendar date and Modified Julian Day number. #17750 (PHO).
Added functions toModifiedJulianDay, fromModifiedJulianDay, toModifiedJulianDayOrNull, and fromModifiedJulianDayOrNull for converting between Proleptic Gregorian calendar dates and Modified Julian Day numbers.

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

Use toModifiedJulianDay(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.