I read a question about historical dates (does-mysql-support-historical-date-like-1200) and there is an interresting response that talk about the use of "datestamp", an equivalent of timestamp but with day as interval.
To achieve this it's said that we need to handle leap years and other stuffs. Is this really matters ?
What if we assume that all months have 31 days as well at insert time than at fetch time ?
ie.:
- 0856-11-05 -> 5 + 11*31 + 856*(12*31) = 318778;
- 318778 / 372 = (int)856, 318778 - (856*372) = 346, 346 / 31 = (int)11, 346 - (11*31) = 5
Eventually we can check at insert time if the date is possible...
What do you think about that ?
Thanks in advance!