[Pitch] Extending Date with methods to get specific new dates

I later realized saving point-in-time has its own issues. One is as you described in option 3 above. While it's possible to modify code to support representing a day using any time in that day, instead of start of the day, it's not ideal. I think the root cause is inherent in a date only (no accurate time) system - it's vague by its nature. The example of different timezones just amplifies it. Event if there is no different timezone involved, it's still not suitable for accurate schedule. For example, an app which represents transactions using days has no idea about their order even though it can pretend to know it by showing inbound transations before oubound transactions in UI. Another example: adding timezone information doesn't help because there isn't accurate 1:1 mapping between days in different time zones. I guess that's probably one of the reasons why a date only libarary doesn't exist unless we accept those limitations.

1 Like