Files
harbour-core/harbour/contrib/hbclipsm/tests/testdate.prg
Viktor Szakats f2480e5443 2007-12-01 02:34 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/make_b32_all.bat
   * contrib/make_vc_all.bat
   * contrib/Makefile
   - contrib/msql
   + contrib/hbmsql
   * contrib/hbmsql/common.mak
   * contrib/hbmsql/Makefile
   - contrib/libmisc
   + contrib/hbmisc
   - contrib/mysql
   + contrib/hbmysql
   - contrib/odbc
   + contrib/hbodbc
   - contrib/ole
   + contrib/hbole
   - contrib/pgsql
   + contrib/hbpgsql
   * contrib/hbpgsql/common.mak
   * contrib/hbpgsql/Makefile
   - contrib/samples
   + contrib/hbclipsm
   * contrib/hbclipsm/common.mak
   * contrib/hbclipsm/Makefile
2007-12-01 01:34:59 +00:00

38 lines
774 B
Plaintext

/*
* $Id$
*/
function Test()
local dDate
local aDate
SET DATE FORMAT "dd/mm/yyyy"
dDate := CTOD( "19/07/71" )
SET CENTURY OFF
? "[" + MDY( dDate ) + "]"
? "[" + DMY( dDate ) + "]"
? DateAsAge( dDate )
aDate := DateAsArray( dDate )
? aDate[1], aDate[2], aDate[3]
? ArrayAsDate( aDate )
? DateIsLeap( dDate )
? NtoD( aDate[2], aDate[3], aDate[1] )
? AddMonth( dDate, 12 )
? AddMonth( dDate, 18 )
SET CENTURY ON
? "[" + MDY( dDate ) + "]"
? "[" + DMY( dDate ) + "]"
? DateAsAge( dDate )
aDate := DateAsArray( dDate )
? aDate[1], aDate[2], aDate[3]
? ArrayAsDate( aDate )
? DateIsLeap( dDate )
? NtoD( aDate[2], aDate[3], aDate[1] )
? AddMonth( dDate, 12 )
? AddMonth( dDate, 18 )
return nil