As I was looking into solutions for another question, I found myself wondering whether it was possible to use .NET's Calendar class to implement a calendar that wasn't based on Earthly conventions.
For instance, Mars' day is about 2.7% longer than a day here on Earth:
A convention used by spacecraft lander projects to date has been to keep track of local solar time using a 24 hour "Mars clock" on which the hours, minutes and seconds are 2.7% longer than their standard (Earth) durations.
Is there any good way to implement a MarsCalendar such that the length of a second is different from the standard GregorianCalendar, and thus be able to use DateTime objects based on it for all the standard AddDays(), AddHours(), etc. functions? (Note: Ideally, a solution - if one exists - would be applicable to any form of planetary object for which it is possible to define both "1 day" and "1 year" of consistent lengths. Mars makes for a great example, though)
Calendaralready supports setting arbitrary numbers of day per year.Calendarclass. The same class can be used by VB.NET or any other .NET language. It's the .NETCalendarclass.