jakartaee / jakartaee/persistence
comparison operators are not meaningful for times
- Dominant language
- Java
- Stars
- 267
- Forks
- 78
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 13
Description
We should clarify in the spec that the `<`, `>`, `<=`, and `>=` operators are not defined for `LocalTime`.
Why not? Well, because:
1. Time of day doesn't have a meaningful total order. Times form a topological circle. It's not meaningful to say that 23:59:59 > 00:00:00. That's just completely arbitrary. Is the first time a day after or one second before the second time? You need a date to know for sure.
2. Oracle has no ANSI-like `TIME` type, and to emulate it requires jumping through really disgusting hoops.
Contributor guide
Research direction
Start with the persistence specification section covering LocalTime and its comparison operators. Clarify that <, >, <=, and >= are not defined for LocalTime, preserving the rationale in the issue; done means the specification states this unambiguously.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100