Fixed some date and time conversion functions
[AXE.git] / demos / acltest.cpp
index 689ddb1..299f655 100644 (file)
@@ -5,7 +5,7 @@
 ***********************
 **      FILE NAME      : acltest.cpp
 **      SYSTEM NAME    : AXE - Andromeda X-windows Encapsulation
-**      VERSION NUMBER : $Revision: 1.2 $
+**      VERSION NUMBER : $Revision: 1.3 $
 **
 **  DESCRIPTION      :  Test routine for non-X classes
 **
 
 /*****************************
    $Log: acltest.cpp,v $
-   Revision 1.2  2002-07-27 06:34:06  arjen
+   Revision 1.3  2002-09-02 06:18:12  arjen
+   Fixed some date and time conversion functions
+
+   Revision 1.2  2002/07/27 06:34:06  arjen
    Removed the obsolete complex number test from acltest.
    BUG FIX: testaxe crashed when no configuration file is available.
 
@@ -31,7 +34,7 @@
 
 *****************************/
 
-static const char *RCSID = "$Id: acltest.cpp,v 1.2 2002-07-27 06:34:06 arjen Exp $";
+static const char *RCSID = "$Id: acltest.cpp,v 1.3 2002-09-02 06:18:12 arjen Exp $";
 
 #include "String.h"
 #include "integer.h" 
@@ -109,6 +112,7 @@ int main()
    cout << "c = b : c = " << c << "\n";
 
    cout << "***********************\nDate Test\n*********************\n";
+
    date d1, d2(22,7,1964);
    
    cout << "Default constructor: " << d1 << ", with (d,m,y): " << d2 << "\n";
@@ -120,7 +124,7 @@ int main()
    d2 = date(datestring);
 
    cout << datestring << " parses into (DD-MM-YYYY): " << d2 << "\n";
-   datestring = d2.format();
+   datestring = d2.format("%F");
    cout << "Formatted date: " << datestring << "\n";
 
    d1 = today();
@@ -160,5 +164,9 @@ int main()
    cout << "t1 - t2 = " << t1 - t2 << "\n";
    cout << "t2 - t1 = " << t2 - t1 << "\n";
 
+   d1 = today();
+   t1 = now();
+
+   cout << "\nThe time now is " << d1 << " " << t1 << "\n";
    return 0;
 }