This is a typical use case in energy (or utilities)
applications where date type has a value for Stop Time
that would allow, together with Start Time, to represent
an open-ended time span.

However, since the data in business apps is persisted
in databases, the physical representation of such date
is NULL, a special value available for any types.

Although infinity for date bares one simple convenience,
that t < StopTime holds for it, in general NULL needs
special processing, which will prevent passing it to
the same streams of calculations that regular data goes.

For the above span test, date using NULL, in JavaScript 
or SQL it could be said:
  t > StartTime && (!StopTime || t < StopTime)

For user representation or export, NULL is better
represented as blank rather than some special form.

For integers, which really don't have infinity value
(same in the database), NULL can be encoded as any
unused value. But it still needs to be processed
separately.


--- Anssi Seppälä <[EMAIL PROTECTED]> wrote:

> Here is the complete story why _ was so ideal with dates:
> 
> The application handles power contracts. Contract can be for a 
> defined time defined by start and end dates or only by start day 
> being valid temporarily. yyyymmdd as an integer representation of 
> date and _ as an infinte date or undefined future date was a good 
> choice because:
> - comparisons between intervals and values > < and CC, CO, etc. worked
> - 0 100 100#. is easy way to parse year month and day
> - _ looks like "infinte" and is suitable directly to gui User 
> understands that a contract with starting day 20080317 and ending day 
> _ means that the contract is valid "forever" unless date is given.
> - _ is one of the reasons why I like J because this solved a lot of 
> problems with this application.
> 
> Thanks to this forum there is a lot of clever methos to replace the _ 
> where it causes NaN error.
> 
> Anssi
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> 



      
____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to