S87 - date range oddity 
Author Message
 S87 - date range oddity

This is probably of no consequence at all, but if anyone has
any S87 code out there that _relies_ on the published date
range of 01000101 to 29991231 it might be of interest.

There is a bug in the date validation part of CLIPPER.LIB
that allows the entry of _leap day_ dates only outside the
defined range - eg. it is possible to enter 29/02/3004 or
29/02/4800 to a date field (with CENTURY ON of course) though
attempts to enter any non-leap day dates are rejected (for
example 28/02/4800 is "illegal").  This really only applies
to dates _after_ 29991231; whilst the bug in theory allows
a date entry of eg. 29/02/0096, the RTL will interpret 0096
as 1996 (or 2096 if EPOCH() has been set appropriately).

I don't know if the same date-encoding code is used in 5.x
or not - anyone care to check?  Anyone care?  :-)

(BTW the Harbour code seems solid in this respect.)
--
Pete
        "We have not inherited the earth from our ancestors,
         we have borrowed it from our descendants."



Sun, 27 Jan 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. S87 Dates defaulting to 1900 + year entered

2. S87 character to date

3. coding a date range

4. DB Date Range Field Type

5. Help: Need all changes in a date-range

6. CW Browse Template Date Range & ODBC

7. problems generating a report with a date range

8. Need help on date range fot sales tax

9. Setting date Range on a report

10. HELP: SQL ODBC date range, 2nd post

11. changing date range from print station

12. Remove or Delete : range of dates

 

 
Powered by phpBB® Forum Software