To get anything done, I feel like the general programmer[1] is allowed to assume, at a bare minimum, a Proleptic Gregorian calendar. Anything else just makes handling early (pre-Gregorian) dates madness. (Various geographical locations adopted the calendar at different times, so you end up needing to know where you are to compute the "local" date. Even further back in history the rules get even more odd, and unknown. [2], if I read it correctly, includes a table of when scholars _think_ people inserted leap years.)
Once you go with "Proleptic Gregorian calendar", I think points such as
> Months have either 28, 29, 30, or 31 days.
…are actually always true. Of course, two bullets down is,
> There is only one calendar system in use at one time.
Which is essentially what we're using as axiom here. It's true because we've defined it as such. (Cheating, I admit, but if you're building the next great mobile app, do you care?)
I do wish that site included fold-out sections to de-mystify some of the points.
> Non leap years will never contain a leap day.
Your definition of leap year isn't "year with a leap day"?
> Unix time is the number of seconds since Jan 1st 1970.
> Unix time […] is […] defined as the number of seconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970, not counting leap seconds.[3]
Again I wish for pop-out explanations, because I'm left to wonder whether POSIX's lack of leap seconds is what the author is hinting at.
I'm bored though, so perhaps I should write a gist showing which of these I believe to hold (and why) and which do not (and why).
[1]: I think anyone breaking this rule would know that their area of interest requires them to break it, and thus know that they need attention.
What about the Islamic calendar? If your software handles anything having to do with dates and is being used internationally then it seems to me you have to take that one into account: eventually somebody will want to see their calender or input a date in their local date handling system.
Edit: I am confused about the downvotes. I point out that he can't assume there is only one calendar system in use, even for general software.
I guess you're being downvoted because your point about Islamic calendars is (mostly) wrong. Islamic calendars (but I don't even live in a country where it's used, so it might be more nuanced than what I say) are used mostly for religious purposes; you 'can't' (practically speaking) use only the Islamic calendar because many things you care about (like, your barber's appointment) would be done in 'Gregorian calendar'. So an Islamic calendar is only needed in a very limited subset of all software packages, even in Islamic regions. It's not as simple as 'in some areas people use Gregorian, on others Islamic', which your post seems to suggest.
Iran is using the Islamic calender. Just look at their railways website http://www.rai.ir/index.aspx Or the website for the airport in Tehran ( http://ikia.airport.ir/ ), which uses persian dates for the weather forcase and gregorian for flight details.
And yet, when I am contacted by Iranian researchers, they all express dates and times in the Gregorian calendar. Obviously those with international contacts are not 'average', but still there is/must be wide spread use of the gregorian calendar - as your airport example confirms.
Either way, let's still for the sake of the argument say that all of Iran only uses the Islamic calendar. That still reduces the GP's point from 'to sell software in countries that are mostly Islamic, you must support multiple calendars' to 'to sell software to Iranian customers you must support multiple calendars'. Iran, just to state the obvious, is widely embargoed across the world, and it's quite challenging to sell anything there, legally (I have first hand experience to the extent that it wasn't worth the time for 5 figure contracts - and I suspect that even 6 figures wouldn't make it worth it).
To conclude, I don't think your contra-anecdotes are enough to counter the position that assuming Gregorian is 'good enough' in the vast majority of cases (again, those few writing software for Mormon record keeping, or history journal analysis tools, or -yes- software for Iranian state systems, probably know so much about dates and times that they don't need '100 things' lists to know what to look out for).
> There is only one calendar system in use at one time.
This is useful, but technically false. Go tour graveyards around Boston. You'll find stones with two death dates on them from the mid-1700's (most of the US changed in 1752).
To get anything done, I feel like the general programmer[1] is allowed to assume, at a bare minimum, a Proleptic Gregorian calendar. Anything else just makes handling early (pre-Gregorian) dates madness. (Various geographical locations adopted the calendar at different times, so you end up needing to know where you are to compute the "local" date. Even further back in history the rules get even more odd, and unknown. [2], if I read it correctly, includes a table of when scholars _think_ people inserted leap years.)
Once you go with "Proleptic Gregorian calendar", I think points such as
> Months have either 28, 29, 30, or 31 days.
…are actually always true. Of course, two bullets down is,
> There is only one calendar system in use at one time.
Which is essentially what we're using as axiom here. It's true because we've defined it as such. (Cheating, I admit, but if you're building the next great mobile app, do you care?)
I do wish that site included fold-out sections to de-mystify some of the points.
> Non leap years will never contain a leap day.
Your definition of leap year isn't "year with a leap day"?
> Unix time is the number of seconds since Jan 1st 1970.
> Unix time […] is […] defined as the number of seconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970, not counting leap seconds.[3]
Again I wish for pop-out explanations, because I'm left to wonder whether POSIX's lack of leap seconds is what the author is hinting at.
I'm bored though, so perhaps I should write a gist showing which of these I believe to hold (and why) and which do not (and why).
[1]: I think anyone breaking this rule would know that their area of interest requires them to break it, and thus know that they need attention.
[2]: https://en.wikipedia.org/wiki/Julian_calendar#Leap_year_erro...
[3]: https://en.wikipedia.org/wiki/Unix_time