GNOME Bugzilla – Bug 599365
Unexpected date handling
Last modified: 2009-10-23 14:20:10 UTC
Enter July 1, 1867 into A1, I would have expected to see anything but ############## since the hashmarks remain even if the cell is made as wide as the screen.
##### here means invalid date. Not sure why that is, though.
static int handle_year (char const *text, GORegmatch const *pm) { int y; if (pm->rm_so == pm->rm_eo) return current_year (); y = handle_int (text, pm, 0, 9999); if (y < 0) return -1; else if (y <= 29) return 2000 + y; else if (y <= 99) return 1900 + y; else if (y <= 1899) return -1; else return y; }
some related (?) observations: =eastersunday(1867) shows as a nice date (probably even the correct one) =date(1867,7,1) shows as July 1, 3767 (I guess Canadian confederation is truly in the future) typing any text that should be read as a date shows ######################
> =date(1867,7,1) shows as July 1, 3767 Excel compatibility! That made a lot more sense before we started supporting pre-1900 dates. if (year < 1900) /* 1900, not 100. Ick! */ year += 1900; I'll move the cut-off down to 1000. (We do not support dates before 15xx anyway.)
DATE fixed.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report. (Bugzilla buttons are back!)