Comment

Comment by hn_throwaway_99

I think the article gets at this, but the biggest "eureka" I had was when I realized that java.util.Date is just sugar around a long value (ms since the epoch). Thus, wherever you use a Date, if you would NOT consider using a long there, then Date is the wrong choice. E.g. timestamp for log entry records - yeah, makes sense. Days on a schedule app - definitely wrong choice.

Of course, as the article and other commenters have said, just use jodatime or the Java 8 equivalent.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton