I’m currently working in Calc with dates in the 1300s and 1400s. The “Day()” function doesn’t work on dates prior to 1582-10-15. For what I’m doing, all I need (RE this issue) is for Day() to return the “day of the month” part of the date; else, I need a reliable way to extract the “day of the month” component from the displayed date.
For my entertainment, I’m using a cell format that shows the date as “YYYY-MM-DD NN”; using the standard ISO8601 format doesn’t help. I can change the format to show only the DD component; however, this is useless for my calculations, as the underlying information is unaffected.
An example of the problem involves calculating the years, months and days between two dates; in this case, I end up with a text value automatically displayed in either a “Y-MM-DD”, a “YY-MM-DD” or a “YYY-MM-DD” format (with right alignment and a fixed-pitch font, the data presents nicely).
Simply subtracting the smaller date from the larger, and applying a date format, doesn’t return the correct answer (a problem with even modern dates, but I’m not dealing with that right now).
I’m using LibreOffice Version: 5.1.6.2 and my OS is Linux Mint 18 “Sarah” with the “Cinnamon” GUI (I hope I expressed that properly).