As already @Villeroy stated, a solution doing exactly what the questioner asked for does not exist.
However there are workarounds relying on user code.
The attached example contains document macros for the purpose (one of the workarounds, the others are only explained) and demonstrates the working.
Of course somebody actually wanting to use the workaround
should move the code to the user profile, and adapt the vnd-callers used by the HYPERLINK() formulas.
disask111398changeDatesToLastDayOfMonth.ods (45.8 KB)
The code uses the Calc function REGEX() only implemented in LibO V6.2 or higher.