home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / snip9707.zip / LTTEST.CPP < prev    next >
Text File  |  1997-07-05  |  2KB  |  46 lines

  1. // +++Date last modified: 05-Jul-1997
  2.  
  3. //
  4. // written by David Nugent
  5. //
  6. // This code is public domain. Use for any purpose is unrestricted.
  7. //
  8. // $Id$
  9. //
  10. // $Log$
  11. //
  12.  
  13. # include "iostream.h"
  14. # include "loctm.h"
  15.  
  16. # define NL '\n'
  17.  
  18. int
  19. main ()
  20. {
  21.     loc_tm t(0);            // Get current time
  22.  
  23.     cout << "Dates ...\n"
  24.       << " Intl    : " << loc_date(t,loc_tm::d_International) << NL
  25.       << " Intl(s) : " << loc_date(t,loc_tm::d_IntlShort)     << NL
  26.       << " USA     : " << loc_date(t,loc_tm::d_Usa)           << NL
  27.       << " IntlEng : " << loc_date(t,loc_tm::d_English)       << NL
  28.       << " Japan   : " << loc_date(t,loc_tm::d_Japanese)      << NL
  29.       << " Full    : " << loc_date(t,loc_tm::d_Full)          << NL
  30.       << " Weekday : " << loc_date(t,loc_tm::d_DayOfWeek)     << NL
  31.       << " Date    : " << loc_date(t,loc_tm::d_Day)           << NL
  32.       << " Month   : " << loc_date(t,loc_tm::d_Month)         << NL
  33.       << " Month(t): " << loc_date(t,loc_tm::d_Month|loc_tm::d_MonText) << NL
  34.       << " Year    : " << loc_date(t,loc_tm::d_Year)          << NL
  35.       << " Year(s) : " << loc_date(t,loc_tm::d_Year|loc_tm::d_YearShort) << NL
  36.       << endl;
  37.     cout << "Times ...\n"
  38.       << " Intl    : " << loc_time(t,loc_tm::t_International) << NL
  39.       << " Short   : " << loc_time(t,loc_tm::t_ShortTime)     << NL
  40.       << " Clock   : " << loc_time(t,loc_tm::t_ClockTime)     << NL
  41.       << " Long    : " << loc_time(t,loc_tm::t_LongTime)      << NL
  42.       << " Millit  : " << loc_time(t,loc_tm::t_Millitary)     << NL
  43.       << endl;
  44.     return 0;
  45. }
  46.