Changeset 2828 in Sophya for trunk/SophyaProg/Tests/ttimestamp.cc


Ignore:
Timestamp:
Nov 2, 2005, 10:00:15 AM (20 years ago)
Author:
ansari
Message:

1/ include values.h commente ds tstboloread.cc tstcolread.cc (compil OSX)
2/ amelioration prog test TimeStamp (TimeStamp::ToDays() et TimeStamp(double days) en particulier)
3/ amelioration prog test tnt.cc : test MuTyV/DVList avec type TimeStamp et test DataTable , SwPPFDataTable avec champs ComplexField et DoubleComplexField

Reza , 2 Nov 2005

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaProg/Tests/ttimestamp.cc

    r2659 r2828  
    2626   
    2727    InitTim();
     28    cout << " Sizeof(TimeStamp=) " << sizeof(TimeStamp) << endl;
    2829    TimeStamp ts;
    29     cout << "ts: Now : " << ts << endl;
    30     TimeStamp ts2("30/01/1962","14:22:35.65");
    31     cout << "ts2: 30/01/1962 14:22:35.65 : " << ts2 << endl;
     30    cout << "ts: Now : " << ts << "(->double: " << (double)ts << " )" << endl;
     31    TimeStamp ts2("26/8/1974","14:22:35.65");
     32    cout << "ts2: 26/8/1974 14:22:35.65 : " << ts2 
     33         << " double->TimeStamp: " << TimeStamp(ts2.ToDays()) << endl;
    3234    TimeStamp ts3("01/01/1905","00:00:00");
    33     cout << "ts3: 01/01/1905 , 00:00:00 : " << ts3 << " (double): " << (double)ts3 << endl;
     35    cout << "ts3: 01/01/1905 , 00:00:00 : " << ts3 << " (double): "
     36         << (double)ts3 << " double->TimeStamp: " << TimeStamp(ts3.ToDays()) << endl;
    3437    TimeStamp ts4("01/01/1901","03:00:20");
    35     cout << "ts3: 01/01/1901 , 02:00:20 : " << ts4 << " (double): " << (double)ts4 << endl;
     38    cout << "ts3: 01/01/1901 , 03:00:20 : " << ts4 << " (double): "
     39         << (double)ts4 << " double->TimeStamp: " << TimeStamp(ts4.ToDays()) << endl;
    3640
     41    TimeStamp ts5("01/12/1899","00:00:00");
     42    cout << "ts5: 01/12/1899 , 00:00:00 : " << ts5 << " (double): "
     43         << (double)ts5 << " double->TimeStamp: " << TimeStamp(ts5.ToDays()) << endl;
     44    TimeStamp ts6("01/12/1899","15:30:00");
     45    cout << "ts6: 01/12/1899 , 15:30:00 : " << ts6 << " (double): "
     46         << (double)ts6 << " double->TimeStamp: " << TimeStamp(ts6.ToDays()) << endl;
     47    cout << " ts.ToString(bool, bool) test : " << endl;
     48    cout << " ts.ToString()= " << ts.ToString() << endl;
     49    cout << " ts.ToString(fgd=true, fgh=false)= " << ts.ToString(true, false) << endl;
     50    cout << " ts.ToString(fgd=false, fgh=true)= " << ts.ToString(false, true) << endl;
    3751
    3852  }
Note: See TracChangeset for help on using the changeset viewer.