oxbowlakes edited this page Sep 14, 2010 · 4 revisions

If Saturn is the answer, what is the question?

Is it:

Are java.util.Date and Calendar a pile of crap because they don’t properly distinguish the concepts of an instant-in-time and “human time” concepts such as year-month-day?

Or perhaps it’s…

Is Joda just too confusing? When the hell did I ever need a non-Gregorian, or non-Western calendar anyway? And WTF is a “chronology”?

Or less controversially…

Around which planet, the sixth out from the Sun, would you find the largest moon in the solar system, “Titan”?

Yes folks, Saturn is the answer to all of these questions and more. It is a bone-crushingly simple datetime library for those of us that have never needed:

  • non-Gregorian calendars
  • months that are not Jan-Dec, days of week that are not Mon-Sun etc
  • to schedule a meeting on Klingon during the saylight saving era of Dhu’ruk-ha’a

In fact, the principal USP of Saturn is that it gives us a very simple way of separating out our the Key Concepts in our domain model, so we can write code like:

val birthday :   Date = { ... }
val marketOpen : TimeOfDay = { ... }
val starts :     Instant =  { ... }

Rather than the hideous:

val birthday :   java.util.Calendar = { ... }
val marketOpen : java.util.Calendar = { ... }
val starts :     java.util.Date =  { ... }
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.