|
|
|
|
|
by bradleybuda
1589 days ago
|
|
The answer is no/no/no because you cannot define a general comparison operator between dates and times without additional context. It's possible that you can define a contextual comparison operator that works for your domain and the question you want to ask, but without knowing the application for this comparison it's pointless to try to make a general statement. My mental model for these kinds of things is that Times are instants and Dates are either: 1. Ranges (with the start and end Time depending on TZ and possibly other context) 2. Discrete cells of a calendar (which are mostly TZ independent - July 5th doesn't happen at the same time everywhere, but it is well-defined everywhere) Also, I've been writing code for 25 years and I still have no idea what a DateTime is. |
|
Pretty sure these are the two cases which the python stdlib datetime covers.