home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / i18nv104.zip / SAMPLE / DT / READ.ME < prev   
Text File  |  1996-02-13  |  3KB  |  102 lines

  1. ===============================================================================
  2.                   Internationalization (I18N) For OS/2                 
  3. ===============================================================================
  4.  
  5.                 Copyright IBM Corporation -- 1993, 1994, 1995
  6.  
  7. DISCLAIMER: This package is not a full implementation of the X/Open XPG4 
  8. specification and does not make any claims of XPG4 branding. It implements 
  9. only the portions of the XPG4 specification which deal with 
  10. internationalization.
  11.  
  12. X/Open is a trademark of the X/Open Company Limited.
  13.  
  14. ===============================================================================
  15.  
  16.  
  17. /************************/
  18. /***     Contents     ***/
  19. /************************/
  20.  
  21. 1.  Overview
  22. 2.  Files in this directory
  23. 3.  How to run the sample program
  24. 4.  How to compile the sample program
  25.  
  26.  
  27. 1.  Overview
  28. ============
  29.  
  30. The sample program in this directory demonstrates the use of culturally-based
  31. date and time formatting functions (strptime, strftime, wcsftime).  These APIs
  32. allow formatting to and from strings (and wide char strings) to the "time_t"
  33. structure.  The formatting for these functions is based on the current locale,
  34. as defined with environment variables.
  35.  
  36.  
  37. 2.  Files in this directory
  38. ===========================
  39.  
  40. File            Purpose
  41. ------------------------------------------------------------------------------
  42. dt.c            Source code for the dt sample program.
  43. dt.def          Definition file needed for compiling the program.
  44. dt.mak          Make file used to compile the sample.
  45. dt.exe          Compiled version of the dt sample.
  46.  
  47. build.cmd       A command file which will compile and link the sample program.
  48. read.me         This file.
  49.  
  50.  
  51. 3.  How to run the sample program
  52. =================================
  53.  
  54. This sample program shows how one can perform culturally-based time and date
  55. formatting, for both char and wchar_t data types.  The following steps show
  56. how the program can be run.
  57.  
  58.      1) Run the \i18n\bin\new_vars command file (or have the environment
  59.         variables already set).
  60.  
  61.      2) Set the value of either LC_ALL or LANG to: En_US (US English).
  62.  
  63.           Ex:   set LANG=En_US
  64.  
  65.      3) Execute the dt.exe program.
  66.  
  67.           Ex:   dt
  68.  
  69.      4) The output from the program should be (note that the date and time
  70.          for the last two statements is based on your system's current date
  71.          and time):
  72.  
  73.           Locale for date and time: ENUS437
  74.  
  75.           Loaded in date:  10/21/93 and time:  12:34:56
  76.  
  77.           Today is: Friday, March 18 1994. Time is:  11:28:47 AM
  78.  
  79.           Date converted with wchar_t type:
  80.           Today is: Friday, March 18 1994. Time is:  11:28:47 AM
  81.  
  82.      5) Experiment with changing the values of the LANG environment
  83.         variable.
  84.  
  85.  
  86. 4.  How to compile the sample program
  87. =====================================
  88.  
  89. NOTE: The sample program is already compiled for you.  If you want to see the
  90.  behavior of the program, you can just run it.  The following instructions
  91.  are needed only if you want to modify the program and recompile it.
  92.  
  93. To compile the sample application:
  94.  
  95.      1) Make sure that the CSET/2 compiler and OS/2 toolkit are installed
  96.         correctly on your system.
  97.  
  98.      2) cd to the directory which contains the collate source files.
  99.  
  100.      3) Type "build" at the command prompt.
  101. 
  102.