Changes

Jump to: navigation, search

Dates

451 bytes added, 12:14, 2 February 2009
Date Math
# for describing (eg, for describing an age)
# for ranking (eg, for computing "record holding" spans)
 
=== Date Differences ===
When a date is subtracted from another, a Span is created. A date Span can be used for creating a textual representation of the difference. A Span can also be used for ranking the difference, including a minimum difference, and a maximum difference.
=== Date Comparisons === There are three methods for comparing datesseeing if one date happened before another date:
# simple method: date1.sortval < date2.sortval
# more sophisticated and expensive: date1.match(date2' "<")
# more restrictive: date1.match(date2, "<<")
 
Likewise for seeing if two dates are the same:
 
# simple method: date1.sortval == date2.sortval
# more sophisticated and expensive: date1.match(date2' "=")
 
and for seeing if one date happened after another date:
 
# simple method: date1.sortval > date2.sortval
# more sophisticated and expensive: date1.match(date2' ">")
# more restrictive: date1.match(date2, ">>")
= TODO =

Navigation menu