Deletions are marked like this. | Additions are marked like this. |
Line 12: | Line 12: |
* See also Martin Fowler's [http://www.martinfowler.com/bliki/ClockWrapper.html ClockWrapper] pattern. |
Time is a very simple construct. Someone asks you what time it is; you glance at your watch, and tell them. "It's a quarter to five." Or you might say, "It's four-forty-three," to give a little more precision. Or maybe "four-forty-three PM" or "sixteen-forty-three." Maybe "four-forty-three PM Eastern Daylight Time" would be more precise, though possibly less helpful if the other person was in a different time zone and it was a time of year when daylight savings time wasn't in effect.
Time is a deceptively complex construct.
This is all unfinished, at this time. (ToBeWritten)
Reference Point
Testability
See also Martin Fowler's [http://www.martinfowler.com/bliki/ClockWrapper.html ClockWrapper] pattern.
Precision
It's possible to have too much precision.
Time comparisons
Is "May 5, 2006" before, after, or equal to "8:00 AM, May 5, 2006"?
References
Martin Fowler discusses a number of [http://www.martinfowler.com/ap2/timeNarrative.html Patterns for things that change with time] (also found as [http://www.martinfowler.com/eaaDev/timeNarrative.html Temporal Patterns]) and [http://www.martinfowler.com/eaaDev/Range.html ranges] (including Time ranges).
- Somewhere I've seen a library to handle many common Time problems in Java. I can't find it at the moment.