UIZE JavaScript Framework

TO DO - Uize.Date

This is a TO DO document for the Uize.Date module.

1. - possibly turn package into an Object

stitch in instance methods from Date object, as is done with the Uize.String.Builder object
make majority of static methods available as instance methods

2. Uize.Date.resolve

consider expanding dateSTRorOBJ value type to dateSTRorINTorOBJ, in order to support dates specified as POSIX milliseconds
refactor tomkidding.com to no longer use Tk.Date
localization

3. - possible new methods...

Uize.Date.is - determines if specified value is a valid date (could be used by Uize.Widget.TableSort in checking for valid date columns)

4. Uize.Date.getRange

4.1. - support more range types

4.1.1. - range, neatly bound

4.1.1.1. - start to end

eg. this week, this month, this year, etc.

4.1.1.2. - start to date

eg. from start of this month till date

4.1.1.3. - date to end

eg. from date till end of month

4.1.1.4. - end and beyond

eg. starting next month

4.1.1.5. - up until start

eg. before this month

4.1.1.6. - past

before date

4.1.1.7. - future

after date

4.1.2. - range, with date alignment

0: starting at
.5: range with date in middle
1: ending at

5. Uize.Date.isRecent

ability to specify time unit for recency window (default to days)
right now, always checks if specified date is recent, relative to now - could also allow reference point date to be specified
right now, you can check if date is within a time window before or after now -- what about date being "around" now (i.e. in a window some time leading up to and some time past now)

6. Uize.Date.constrain

constrain a date to a specified Date range

7. Uize.Date.inRange

7.1. - could be refactored to make use of new =Uize.Date.constrain= method

return +(_date _resolve (_date)) = +_package.constrain (_date,_range)

benefit would be smaller implementation, and Uize.Date.constrain would support ranges where minValue is after maxValue, because it would use Uize.constrain in its implementation