Hi Guys,

It appears that the definitions and usage of:

   HB_IT_DATE
   HB_IT_TIMEFLAG
   HB_IT_DATETIME

   HB_IS_DATE()
   HB_IS_DATETIME()
   HB_IS_TIMEFLAG()

is inconsistent and not designed with system wide consideration.

On quick read of all relevant sources it appears that the correct fix would 
be to make sure that HB_IT_TIMEFLAG is used indeed as a FLAG where 
HB_IT_DATE must always be be the base value. This means that all API which 
returns a DATETIME value must be corrected to:

   pItem->type = HB_IT_DATETIME;

instead of:

   pItem->type = HB_IT_TIMEFLAG;

Once this is done then naturally HB_IS_DATE() will correctly returns TRUE 
for either a DATE value or a DATETIME value, since both are indeed a form of 
a DATE value. This in turn will fix currently missing support for DATETIME 
type in calculations, etc., such as hb_vmPlus() and similar.

Finally, all existing instances of HB_IT_TIMEFLAG / HB_IT_DATETIME, 
HB_IS_DATETIME(), and HB_IS_TIMEFLAG() should be searched and verified and 
corrected when needed. All "case" structure where HB_IT_TIMEFLAG has 
specific logic separate from HB_IT_DATE must be verified to be ordered such 
that the HB_IT_TIMEFLAG/HB_IS_DATETIME() "case" is ABOVE the HB_IT_DATE 
"case".

Since I have not taken any active part in the addition of the HB_IT_DATETIME 
support, and I therefore may not be familiar with all subtleties of the 
implementation I will greatly appreciate the response, and appropriate 
fixing to be addressed by the original contributor[s].

As it is right now the existing support for HB_IT_DATETIME is BROKEN and 
incomplete and fixing this should be a PRIORITY IMO.

Ron 


------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to