home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / zfamily.zip / zfamily / ZDTFUNCS / HELP / ZDTFUNCS.INF (.txt) next >
OS/2 Help File  |  1993-11-17  |  95KB  |  3,628 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Document Content ΓòÉΓòÉΓòÉ
  3.  
  4. This document is made up of five parts: 
  5.  
  6. Library Card 
  7.    General information card for this library. 
  8.  
  9. Installation Guide 
  10.    How to install the Z Family/2 reusable library and how to use the installed 
  11.    files. 
  12.  
  13. User's Guide 
  14.    How to integrate the library with your application and how to call the 
  15.    corresponding functions and macros. 
  16.  
  17. Reference Manual 
  18.    Reference information for the functions, macros and structures provided by 
  19.    this library. 
  20.  
  21. Sample Program 
  22.    How to call and use the sample program. 
  23.  
  24.  
  25. ΓòÉΓòÉΓòÉ 2. Library card ΓòÉΓòÉΓòÉ
  26.  
  27.  
  28. ΓòÉΓòÉΓòÉ <hidden> Dummy ΓòÉΓòÉΓòÉ
  29.  
  30. Package:      ZDTFUNCS 
  31.  
  32. Library:      FMZDTFUN.DLL 
  33.  
  34. Version:      4.30 
  35.  
  36. Requirements: 
  37.  
  38.   OS/2 2.x, C Set/2 or IBM C/C++ Tools 2.0, Toolkit 2.x. 
  39.  
  40. Trademarks 
  41.  
  42.  
  43. ΓòÉΓòÉΓòÉ <hidden> Dummy ΓòÉΓòÉΓòÉ
  44.  
  45.  
  46. ΓòÉΓòÉΓòÉ <hidden> Dummy ΓòÉΓòÉΓòÉ
  47.  
  48. Contact:      Dr. Dario de Judicibus 
  49. IBMMAIL:      ITIBM98W 
  50. Internet:     ddj@vnet.ibm.com 
  51.  
  52.  
  53. ΓòÉΓòÉΓòÉ 3. Installation Guide ΓòÉΓòÉΓòÉ
  54.  
  55. Select one: 
  56.  
  57. Library installation 
  58.  
  59. The expanded tree 
  60.  
  61.  
  62. ΓòÉΓòÉΓòÉ 3.1. Library installation ΓòÉΓòÉΓòÉ
  63.  
  64. Select one: 
  65.  
  66. Γûá Package content
  67. Γûá How to install the library
  68.  
  69.  
  70. ΓòÉΓòÉΓòÉ 3.1.1. Package content ΓòÉΓòÉΓòÉ
  71.  
  72. FMZDTFUN.DLL is distributed as a package containing the following files: 
  73.  
  74.    ZDTFUNCS.ZIP            A ZIP compressed file which contains the library 
  75.                            modules. 
  76.    ZDTFUNCS.INF            The on-line documentation for this reusable library. 
  77.  
  78.  
  79. ΓòÉΓòÉΓòÉ 3.1.2. How to install the library ΓòÉΓòÉΓòÉ
  80.  
  81. To install the libraries, you have to perform the following steps: 
  82.  
  83.   1. Locate the directory of the CD-ROM, remote partition, or diskette where 
  84.      ZDTFUNCS.ZIP is placed. Let's say, for example, P:\ZFAMILY. 
  85.  
  86.   2. Move to the directory on your system where you want to install the 
  87.      reusable library. For example, move to D:\REUSE. 
  88.  
  89.   3. Unpack the ZIP file by using option -d. Please, note that such option must 
  90.      be lower case. In our case, issue the following command: 
  91.  
  92.            [D:\REUSE]  PKUNZIP2 -d P:\ZFAMILY\ZDTFUNCS.ZIP
  93.  
  94.   4. When the command is terminated, a new directory is available on your 
  95.      system. In our example, P:\ZFAMILY\ZDT. Such a directory contains several 
  96.      other sub-directories which contains all the files needed to use the 
  97.      reusable library. The directory tree is described in Library Tree. The 
  98.      content of each directory is described in detail in Content of 
  99.      directories. 
  100.  
  101.   5. In order to use the library, you must now move the unpacked files to the 
  102.      appropriate directories in your development environment. In particular 
  103.      move 
  104.  
  105.     o the headers from .\ZDT\H to any directory listed in your INCLUDE 
  106.       environment variable. 
  107.  
  108.     o the import and/or object libraries from .\ZDT\LIB and .\ZDT\DEVEL to any 
  109.       directory listed in your LIB environment variable. 
  110.  
  111.     o the dynamic link libraries from .\ZDT\DLL to any directory listed in your 
  112.       LIBPATH environment variable. 
  113.  
  114.      You may also want to move this file from .\ZDT\HELP to any directory 
  115.      listed in your BOOKSHELF environment variable. 
  116.  
  117.  Now you are ready to work with the ZDT reusable library. 
  118.  
  119.  
  120. ΓòÉΓòÉΓòÉ 3.2. The expanded tree ΓòÉΓòÉΓòÉ
  121.  
  122. Select one: 
  123.  
  124. Γûá Library tree
  125. Γûá Content of directories
  126.  
  127.  
  128. ΓòÉΓòÉΓòÉ 3.2.1. Library tree ΓòÉΓòÉΓòÉ
  129.  
  130. When you unpack ZDTFUNCS.ZIP, a new sub-directory is created on your system: 
  131. ZDT. Its structure is the following: 
  132.  
  133.   current dir
  134.   Γöé
  135.   Γöé ZDT
  136.   Γö£ΓöÇΓöÉ
  137.   Γöé Γö£ΓöÇΓöÇΓöÇΓöÇ H
  138.   . Γö£ΓöÇΓöÇΓöÇΓöÇ DLL
  139.   . Γö£ΓöÇΓöÇΓöÇΓöÇ LIB
  140.   . Γö£ΓöÇΓöÇΓöÇΓöÇ MRI
  141.   . Γö£ΓöÇΓöÇΓöÇΓöÇ HELP
  142.   . Γö£ΓöÇΓöÇΓöÇΓöÇ DEVEL
  143.   . ΓööΓöÇΓöÇΓöÇΓöÇ SAMPLE
  144.  
  145.  
  146. ΓòÉΓòÉΓòÉ 3.2.2. Content of directories ΓòÉΓòÉΓòÉ
  147.  
  148. Hereinafter is the list of the directories that are created when ZDTFUNCS.ZIP 
  149. is unpacked as described in How to install the library.  The content of each 
  150. directory is described in detail. 
  151.  
  152. The H sub-directory contains all the header files (H  and RCH) to be added to 
  153. the INCLUDE path of the application development environment. Move all the files 
  154. from this directory to the appropriate path in your environment. 
  155.  
  156.    Important If you use other Z Family/2 reusable libraries in your development 
  157.    environment, ensure that you are using the latest version of the zgeneral.h 
  158.    header file, which is available in all  the library packages. You may do 
  159.    that by comparing the update dates in the prologue of the header file. 
  160.  
  161.        /*
  162.        **  Module  : ZGENERAL.H
  163.        **  Authors : Dario de Judicibus (DEJUDICI at ROMEPPC)
  164.        **       Alessandro Cavallini (CAVALLI at ROMEPPC)
  165.        **       Giacomo Lenoci
  166.        **  Created : 10 Jan 1992
  167.        **  Updated : 01 Feb 1993
  168.        **  Version : 2.30
  169.        **  Content : General includes for all Z Family/2 DLLs
  170.        **  Product : Z Family/2 Project (5641-504) FMZ
  171.        **
  172.        */
  173.  
  174.  The DLL sub-directory contains all the dynamic link library or libraries (DLL) 
  175.  to be added to the LIBPATH path of the application development environment and 
  176.  of the run environment. Move all the files from this directory to the 
  177.  appropriate path in your environment. 
  178.  
  179.  The LIB sub-directory contains all the import library or libraries (LIB) to be 
  180.  added to the LIB path of the application development environment. Move all the 
  181.  files from this directory to the appropriate path in your environment. 
  182.  
  183.  The MRI sub-directory contains all the translatable objects, that is texts 
  184.  that might be translated to other languages (see Machine Readable Information 
  185.  for additional information). 
  186.  
  187.  The HELP sub-directory contains the documentation of libraries, and a news 
  188.  file (ZDTNEWS.DOC) containing modifications applied at the last minute and not 
  189.  available in the on-line manuals, and the history of changes. 
  190.  
  191.  The DEVEL sub-directory contains the object library or libraries (LIB) and the 
  192.  sample of the DEF and MAK files that can be used to generate your own DLL(s) 
  193.  (see Create your own library for details). 
  194.  
  195.  The SAMPLE sub-directory contains the source code and the executable code of 
  196.  the sample program. It doesn't contain the DLL file(s) too, anyway. So, to run 
  197.  the sample, you must ensure that all the required DLL files have been copied 
  198.  to any directory of your LIBPATH. Such files are not only those pertaining to 
  199.  this library, but also those belonging on any pre-requisite Z Family/2 
  200.  Reusable Library. 
  201.  
  202.    Important If the library depends on other Z Family/2 reusable libraries, all 
  203.    the files belonging to the pre-requisite libraries will be part of the 
  204.    dependent library only in the beta versions of the package. 
  205.  
  206.    The final version won't contain any pre-requisite file.  That is true for 
  207.    the SAMPLE sub-directory too. So, you won't be able to recompile the sample 
  208.    program unless you install the pre-requisite packages too. 
  209.  
  210.  
  211. ΓòÉΓòÉΓòÉ 4. User's Guide ΓòÉΓòÉΓòÉ
  212.  
  213. Select one: 
  214.  
  215.  General information 
  216.  
  217.  Basic topics 
  218.  
  219.  Advanced topics 
  220.  
  221.  
  222. ΓòÉΓòÉΓòÉ 4.1. General information ΓòÉΓòÉΓòÉ
  223.  
  224. Select one: 
  225.  
  226. Γûá Library overview
  227. Γûá Include files
  228. Γûá Requirements
  229. Γûá Development rules
  230. Γûá Trademarks
  231.  
  232.  
  233. ΓòÉΓòÉΓòÉ 4.1.1. Library overview ΓòÉΓòÉΓòÉ
  234.  
  235. This DLL contains a set of functions to handle dates and times, that is to 
  236.  
  237.  o validate dates and times 
  238.  o extract date and time information 
  239.  o perform arithmetics with dates and times 
  240.  o format strings containing dates and times 
  241.  o compute local times belonging to different time zones 
  242.  
  243.  FMZDTFUN.DLL is NLS enabled. In fact, month and weekday names are stored in 
  244.  other libraries (ZDTRSxxx.DLL) which may be dynamically loaded to support 
  245.  different languages (xxx is the language identifier). 
  246.  
  247.  For details see 
  248.  
  249.   ΓûáDefinitions and formats.
  250.   ΓûáValid ranges.
  251.   ΓûáNLS considerations.
  252.   ΓûáSpecification format.
  253.  
  254.  
  255. ΓòÉΓòÉΓòÉ 4.1.2. Include files ΓòÉΓòÉΓòÉ
  256.  
  257. The system include files that are requested to use this library are: 
  258.  
  259.  #define INCL_PM
  260.  #define INCL_DOS
  261.  #include <os2.h>
  262.  #include <stdio.h>
  263.  #include <stdlib.h>
  264.  #include <stdarg.h>
  265.  #include <string.h>
  266.  #include <signal.h>
  267.  #include <time.h>
  268.  
  269. The specific include files that are requested to use this library are: 
  270.  
  271.  zgeneral.h 
  272.       Definitions and types for all Z Family/2 DLL's. 
  273.  zdtdefs.h 
  274.       Macro and constants for this library. 
  275.  zdttypes.h 
  276.       Type definitions for this library. 
  277.  zdtproto.h 
  278.       Function prototypes for this library. 
  279.  
  280.  Note:  The specific includes must be included in the order as listed above. 
  281.  
  282.  In addition, the following file is needed because it's included by zdtdefs.h: 
  283.  
  284.  zdtrsrcs.rch 
  285.       String identifiers for the names of months and weekdays. 
  286.  
  287.  
  288. ΓòÉΓòÉΓòÉ 4.1.3. Requirements ΓòÉΓòÉΓòÉ
  289.  
  290. FMZDTFUN.DLL is intended to run under OS/2 2.x. It doesn't run under previous 
  291. versions of OS/2. 
  292.  
  293. FMZDTFUN.DLL has been compiled by IBM C/C++ Tools 2.0 and statically linked to 
  294. the C run-time libraries. Then you don't need such libraries to use it. 
  295.  
  296. Notes FMZDTFUN.DLL functions can be called either from C and from C++. In 
  297. addition, an exception handler is registered for each exported function. 
  298.  
  299. A sample program that shows how to use FMZDTFUN.DLL functions is provided in 
  300. the DLL's package too. A short description of that sample is available in 
  301. Sample program tutorial. 
  302.  
  303. The sample program uses the IMPORTS statement in its .DEF to import the 
  304. FMZDTFUN.DLL functions. File FMZDTFUN.LIB is provided too as an alternative to 
  305. such solution. 
  306.  
  307. It is also possible to create a clone of FMZDTFUN.DLL by using the files 
  308. available in the DEVEL sub-directory of the tree created by exploding the ZIP 
  309. file distributed with the package (see Create your own library). 
  310.  
  311.    Important 
  312.  
  313.    Please, note that even if you use FMZDTFUN.DLL to statically link the DLL 
  314.    functions, you must install in your system all the resource DLL's, 
  315.    containing the names of the months and of the days of week in several 
  316.    languages (ie. FMZDTxxx.DLL). You may avoid that only if you don't use the 
  317.    following functions: 
  318.  
  319.    o zdtDefLangId() 
  320.    o zdtFormatDate() 
  321.    o zdtGetLangId() 
  322.    o zdtLanguage() 
  323.    o zdtSetLanguage() 
  324.    o zdtMonthAsString() 
  325.    o zdtMonthName() 
  326.    o zdtWeekdayAsString() 
  327.    o zdtWeekdayAsName() 
  328.  
  329.    That means also that you may clone only FMZDTFUN.DLL, but not the resource 
  330.    libraries. 
  331.  
  332.    See NLS considerations for further details on resource DLL. 
  333.  
  334.  
  335. ΓòÉΓòÉΓòÉ 4.1.4. Development rules ΓòÉΓòÉΓòÉ
  336.  
  337. To safely integrate any Z Family/2 reusable library in your application, you 
  338. need to follow a simple set of rules: 
  339.  
  340.   1. Do not use names beginning by a lower case "z" for 
  341.  
  342.     o functions 
  343.     o macros 
  344.     o global structures 
  345.     o types 
  346.     o constants 
  347.     o #define 
  348.     o global variables 
  349.  
  350.   2. Do not use names beginning by a "z" for 
  351.  
  352.     o include files (.H) 
  353.     o dynamic link libraries (.DLL) 
  354.  
  355.  Follow these rules and your code can take full advantage of the services 
  356.  provided by the current and future Z Family Reusable Libraries/2. 
  357.  
  358.  
  359. ΓòÉΓòÉΓòÉ 4.1.5. Trademarks ΓòÉΓòÉΓòÉ
  360.  
  361. IBM Z Family/2 Reusable Libraries is copyrighted by IBM Corporation. 
  362.  
  363. IBM Corporation trademarks 
  364.  
  365.  CUA
  366.  Common User Access
  367.  IBM
  368.  IBM C Set/2
  369.  IBM C/C++ Tools
  370.  Operating System/2
  371.  OS/2
  372.  Presentation Manager
  373.  SAA
  374.  Systems Application Architecture
  375.  Workplace Shell
  376.  
  377. Other trademarks 
  378.  
  379.  Intel is a trademark of the Intel Corporation.
  380.  Microsoft and Windows are trademarks of the Microsoft Corporation.
  381.  PKZIP and PKUNZIP are trademarks of the PKWare Corporation.
  382.  80386 is a trademark of the Intel Corporation.
  383.  
  384.  
  385. ΓòÉΓòÉΓòÉ 4.2. Basic topics ΓòÉΓòÉΓòÉ
  386.  
  387. Select one: 
  388.  
  389. Γûá Definitions and Formats
  390. Γûá Valid Ranges
  391. Γûá NLS Considerations
  392. Γûá Specification Format
  393.  
  394.  
  395. ΓòÉΓòÉΓòÉ 4.2.1. Definitions and formats ΓòÉΓòÉΓòÉ
  396.  
  397. The following definitions are used in the present document. 
  398.  
  399.  Day of month 
  400.     That number which corresponds to the ordinal position of day in month 
  401.     starting from the first day in month. 
  402.  
  403.  Day 
  404.     Shortage for day of month 
  405.  
  406.  Day of year 
  407.     That number which corresponds to the ordinal position of day in the year 
  408.     starting from January 1st.. 
  409.  
  410.  Weekday 
  411.     That number which corresponds to the ordinal position of day in a week 
  412.     starting from Monday (International conventions). See zdtWEEKDAY for 
  413.     pre-defined values used in FMZDTFUN.DLL. 
  414.  
  415.  Julian date 
  416.     A number representing a date and using format yyddd, where yy are the last 
  417.     two digits of the year, and ddd is the day of year (eg. 92013). 
  418.  
  419.  Date separator 
  420.     A character used to separate date elements in date formats. Common date 
  421.     separators are the slash (/) character, the dash (-) character, or the dot 
  422.     (.) character. It's country dependent. 
  423.  
  424.  Anglo-Saxon format 
  425.     A date format where the first element is the month, the second is the day, 
  426.     and the third is the year (eg. Jan 3, 1992 or 1/3/92). 
  427.  
  428.  European format 
  429.     A date format where the first element is the day, the second is the month, 
  430.     and the third is the year (eg. 3 Jan 1992 or 3/1/92). 
  431.  
  432.  12h format 
  433.     A time format where hours range from 0 to 12, provided an additional 
  434.     information to specify the corresponding half of the day (ie. AM  or PM). 
  435.  
  436.  24h format 
  437.     A time format where hours range from 0 to 24. 
  438.  
  439.  Sorted format 
  440.     (1) A date format where the first element is the year, the second is the 
  441.     month, and the third is the day (eg. 1992.1.3 or 920103). (2) A time format 
  442.     where the first element is the hours in 24h format, the second element is 
  443.     minutes, and the third is seconds (eg. 231559). 
  444.  
  445.  Timezone 
  446.     A segment of earth, mostly placed between two meridians, having the same 
  447.     time. Each time zone is defined by the number of hours, or fraction of 
  448.     hours, from the Greenwich meridian. Currently such definition has been 
  449.     slightly changed by the introduction of the Universal Coordinated Time 
  450.     (UTC). 
  451.  
  452.  UTC time 
  453.     Universal time, that is the base from which all local times are derived by 
  454.     applying the corresponding time zone value. 
  455.  
  456.  Local time 
  457.     The time in a specific time zone. 
  458.  
  459.  Leap second 
  460.     A second added twice every year to time, to synchronize UTC time and solar 
  461.     one. 
  462.  
  463.  
  464. ΓòÉΓòÉΓòÉ 4.2.2. Valid ranges ΓòÉΓòÉΓòÉ
  465.  
  466. The following section deals with the valid ranges for dates, times, and all the 
  467. elements related to them, as weekdays, hours, and so on. 
  468.  
  469. Valid range for dates 
  470.  
  471. The valid range of values for the dates handled by FMZDTFUN.DLL is from January 
  472. 1st, 1860. to December 31st, 2099 included. 
  473.  
  474. Then the valid range for years is from 1860 to 2099, that one for months is, of 
  475. course, 1 to 12, and that one for days depends on the corresponding month and 
  476. if the year is leap, that is from 1 to 28, 29, 30 or 31. 
  477.  
  478. The following pre-defined values can be used for the lower and upper limit for 
  479. year values: 
  480.  
  481.   Name      Value   Included in range
  482.  
  483.   zdtBASEYEAR   1860    Yes
  484.   zdtLASTYEAR   2100    No
  485.  
  486. FMZDTFUN.DLL functions use an internal format for dates, whose type is FMZDATE. 
  487. In fact a date is internally stored as the number of days since January 1st, 
  488. 1860. 
  489.  
  490. There are two set of pre-defined values that can be used for month and weekday 
  491. numbers to write a more readable code: 
  492.  
  493.  zdtWEEKDAY     for weekday numbers (1..7), that is 
  494.  
  495.                                  MONDAY
  496.                                  TUESDAY
  497.                                  WEDNESDAY
  498.                                  THURSDAY
  499.                                  FRIDAY
  500.                                  SATURDAY
  501.                                  SUNDAY
  502.  
  503.  zdtMONTH       for month numbers (1..12), that is 
  504.  
  505.                                  JANUARY
  506.                                  FEBRUARY
  507.                                  MARCH
  508.                                  APRIL
  509.                                  MAY
  510.                                  JUNE
  511.                                  JULY
  512.                                  AUGUST
  513.                                  SEPTEMBER
  514.                                  OCTOBER
  515.                                  NOVEMBER
  516.                                  DECEMBER
  517.  
  518.  Note:  The first day of week is Monday according to the international 
  519.  standards. There is no reason to support also the convention that define 
  520.  Sunday as the first day of week, since in any case you may use the pre-defined 
  521.  values to check if a certain day is Monday or Sunday. At that point is up to 
  522.  you to decide how to consider that day in the week. 
  523.  
  524.  If an out of range date zdtDATE  type) is passed to any of the functions which 
  525.  extract date information (ie. year, month, weekday and so forth), value 
  526.  zdtINVALID  is returned to the caller. 
  527.  
  528.  Valid range for times 
  529.  
  530.  The valid range of values for the times handled by FMZDTFUN.DLL is the 24 hour 
  531.  format range. 
  532.  
  533.  Then the valid range for hours is from 0 (midnight) to 24 not included, 
  534.  whereas that one for minutes and seconds is 0 to 59 included. So, leap 
  535.  seconds, as defined by UCT standards, are not supported. In fact UCT states 
  536.  that twice every year is it possible to have a leap second, so that a time 
  537.  like 11:59:60 may occur. 
  538.  
  539.  Time zones are identified by a number of minutes which in most cases depends 
  540.  on the distance from the Greenwich meridian. Time zones are positive moving 
  541.  from Greenwich towards east, negative moving towards west. 
  542.  
  543.  The following pre-defined values can be used for the lower and upper limit for 
  544.  zone values: 
  545.  
  546.     Name      Value   Included in range
  547.  
  548.     zdtEASTLIMIT  +720    Yes
  549.     zdtWESTLIMIT  -720    Yes
  550.  
  551.  FMZDTFUN.DLL functions use an internal format for times, whose type is 
  552.  zdtTIME. In fact a time is internally stored as the number of seconds since 
  553.  midnight. 
  554.  
  555.  
  556. ΓòÉΓòÉΓòÉ 4.2.3. NLS considerations ΓòÉΓòÉΓòÉ
  557.  
  558. All the Z Family/2 Reusable Library libraries are NLS enabled, that is all the 
  559. translatable resources are stored in a resource file which may be translated 
  560. and included in the library file by using the resource compiler. 
  561.  
  562. In addition however, FMZDTFUN.DLL gives the possibility to dynamically select 
  563. the language to be used for the names of months and weekdays. Such strings are 
  564. stored in additional libraries, one for each language.  Each library is called 
  565. FMZDTFUN.DLL where xxx is the language identifier.  You may use 
  566. zdtSetLanguage() function to select the language to be used by all the 
  567. following calls to FMZDTxxx.DLL services, up to the next call to that function. 
  568.  
  569. zdtSetLanguage() accepts as input a pre-defined value of type zdtLANGUAGE. 
  570.  
  571. The currently supported languages are: 
  572.  
  573.   Language        Identifier     zdtLANGUAGE value
  574.  
  575.   Default          ---        zdtDEFLANG
  576.  
  577.   Brazilian Portuguese   "BPO"        zdtBPOLANG
  578.   Dutch           "DUT"        zdtDUTLANG
  579.   English          "ENG"        zdtENGLANG
  580.   French          "FRA"        zdtFRALANG
  581.   German          "DEU"        zdtDEULANG
  582.   Italian          "ITA"        zdtITALANG
  583.   Spanish          "ESP"        zdtESPLANG
  584.   Swedish          "SVE"        zdtSVELANG
  585.   Danish          "DAN"        zdtDANLANG
  586.  
  587. Initial default language is English. You may reset to that default by using the 
  588. special value zdtDEFLANG. 
  589.  
  590. You may loop on all supported languages by using the following piece of code: 
  591.  
  592. /*
  593. **  Note that zdtLSTLANG is NOT a valid language id
  594. */
  595.  for (i = zdtFSTLANG; i < zdtLSTLANG; i++)
  596.  {
  597.   printf("Setting language %s\n", zdtLanguageId(i)) ;
  598.   printf("Loading library: %s\n", zdtSetLanguage(i)) ;
  599.  }
  600.  
  601. /*
  602. **  Let's go back to the default language now.
  603. */
  604.  printf("Default language %s\n", zdtLanguageId(zdtDEFLANG)) ;
  605.  printf("Loading library: %s\n", zdtSetLanguage(zdtDEFLANG)) ;
  606.  
  607. If you want to know how to add another language to those currently supported by 
  608. FMZDTFUN.DLL, see How to add another language. 
  609.  
  610.  
  611. ΓòÉΓòÉΓòÉ 4.2.4. How to add another language ΓòÉΓòÉΓòÉ
  612.  
  613. If you wish to add another language, just write a resource file based on the 
  614. skeleton in ZDTRSxxx.RC skeleton, call it ZDTRSxxx.RC, where xxx is the 
  615. language identifier, and send it to 
  616.  
  617.  Dr.Dario de Judicibus
  618.  
  619.  Internet : ddj@vnet.ibm.com
  620.  IBM mail : ITIBM98W at IBMMAIL
  621.  
  622. ZDTRSxxx.RC skeleton 
  623.  
  624. /*
  625. **  Module  : ZDTRSxxx.RC
  626. **  Author  : <your name> (<your VNET address>)
  627. **  Created  : <date of creation>
  628. **  Version  : 1.00
  629. **  Content  : Resource Compiler Definition for Date & Time services
  630. **  Language : <language name>
  631. **
  632. */
  633.  
  634.  #define INCL_PM
  635.  #include "os2.h"
  636.  #include "zdtrsrcs.rch"
  637.  
  638.  STRINGTABLE
  639.  BEGIN
  640.   zdtNAM_MONTH01,  "<Month  1>" // ie. January
  641.   zdtNAM_MONTH02,  "<Month  2>" // ie. February
  642.   zdtNAM_MONTH03,  "<Month  3>" // ie. March
  643.   zdtNAM_MONTH04,  "<Month  4>" // ie. April
  644.   zdtNAM_MONTH05,  "<Month  5>" // ie. May
  645.   zdtNAM_MONTH06,  "<Month  6>" // ie. June
  646.   zdtNAM_MONTH07,  "<Month  7>" // ie. July
  647.   zdtNAM_MONTH08,  "<Month  8>" // ie. August
  648.   zdtNAM_MONTH09,  "<Month  9>" // ie. September
  649.   zdtNAM_MONTH10,  "<Month  10>" // ie. October
  650.   zdtNAM_MONTH11,  "<Month  11>" // ie. November
  651.   zdtNAM_MONTH12,  "<Month  12>" // ie. December
  652.   zdtNAM_WEEKDAY1, "<Weekday 1>" // ie. Monday
  653.   zdtNAM_WEEKDAY2, "<Weekday 2>" // ie. Tuesday
  654.   zdtNAM_WEEKDAY3, "<Weekday 3>" // ie. Wednesday
  655.   zdtNAM_WEEKDAY4, "<Weekday 4>" // ie. Thursday
  656.   zdtNAM_WEEKDAY5, "<Weekday 5>" // ie. Friday
  657.   zdtNAM_WEEKDAY6, "<Weekday 6>" // ie. Saturday
  658.   zdtNAM_WEEKDAY7, "<Weekday 7>" // ie. Sunday
  659.  END
  660.  
  661.  
  662. ΓòÉΓòÉΓòÉ 4.2.5. Specification format ΓòÉΓòÉΓòÉ
  663.  
  664. zdtFormatDate() and zdtFormatTime() can be used to format a string which 
  665. respectively contains date and time elements. They work as sprintf(), that is 
  666. require an input template for the output string, which contains special control 
  667. sequences called format specifications. 
  668.  
  669. The zdtFormatDate() and zdtFormatTime() format specifications are just 
  670. extensions of those used by C built-in functions. However, while the printf() 
  671. escape character is %, the zdtFormatXxxx() control sequence prefix is %%. 
  672.  
  673. You may mix zdtFormatXxxx() and sprintf() format specifications, as long as you 
  674. provide also the input values corresponding to the "classic" formats. 
  675.  
  676. Since %% is a valid format for sprintf(), corresponding to a single percent 
  677. sign, any triple like %%x being x none of the above characters, will produce 
  678. %x. Such pair should be considered as the final output, not furtherly 
  679. interpretable by printf(). 
  680.  
  681. On the other side, any %... sequence will be translated according to the 
  682. classic C rules. 
  683.  
  684. All the arguments corresponding to a C format specification can be provided 
  685. after the template, as for sprintf() syntax. 
  686.  
  687. Note:  Both functions return the pointer to the target string, provided by the 
  688. caller as second argument in the parameter list. If date or time are invalid, 
  689. functions return value zdtNOTFORMATTED. In such a case the content of passed 
  690. string is unreliable and should not be used. 
  691.  
  692. Formatting dates 
  693.  
  694. The valid zdtFormatDate() format specification are: 
  695.  
  696.  %%d   day of month 
  697.  %%m   month (number) 
  698.  %%M   month (name) 
  699.  %%w   day of week (number) 
  700.  %%W   day of week (name) 
  701.  %%y   year (short format: last two digits) 
  702.  %%Y   year (long format: all four digits) 
  703.  %%s   date separator 
  704.  
  705.  Let's make some example: 
  706.  
  707.     date = zdtNewDate(1992,JANUARY,2) ;
  708.  
  709.    /*
  710.    **  The following call returns a pointer to string "sz"
  711.    **
  712.    **  >>> Thursday 2 January 1992
  713.    */
  714.     psz = zdtFormatDate( date, sz, zdtNOSEPARATOR,
  715.               "%%W %%d %%M %%Y" ) ;
  716.  
  717.    /*
  718.    **  The following call returns a pointer to string "sz"
  719.    **
  720.    **  >>> Date is Thursday 2 January 1992
  721.    */
  722.     psz = zdtFormatDate( date, sz, zdtNOSEPARATOR,
  723.               "%s %%W %%d %%M %%Y","Date is" ) ;
  724.  
  725.    /*
  726.    **  The following call returns a pointer to string "sz"
  727.    **
  728.    **  >>> 92.01.02 25
  729.    */
  730.     psz = zdtFormatDate( date, sz, '.',
  731.               "%%y%%s%%m%%s%%d %ul",25 ) ;
  732.  
  733.    /*
  734.    **  The following call returns a pointer to string "sz"
  735.    **
  736.    **  >>> %92-01-02% %z %
  737.    */
  738.     psz = zdtFormatDate( date, sz, '-',
  739.               "%%%%y%%s%%m%%s%%d%% %%z %c",'%' ) ;
  740.  
  741.  As you can see in the previous examples, date, the pointer to the target 
  742.  string (allocated by the caller), and the date separator are provided before 
  743.  the template, whereas all the parameters related to the C format 
  744.  specifications follow the template in the function parameter list. 
  745.  
  746.  If no separator has to be used, you may use the pre-defined value 
  747.  zdtNOSEPARATOR. 
  748.  
  749.  Formatting times 
  750.  
  751.  The valid zdtFormatTime() format specification are: 
  752.  
  753.  %%H   hours 
  754.  %%M   minutes 
  755.  %%S   seconds 
  756.  %%s   time separator 
  757.  
  758.  Let's make some example: 
  759.  
  760.     time = zdtNewTime(13,30,15) ;
  761.  
  762.    /*
  763.    **  The following call returns a pointer to string "sz"
  764.    **
  765.    **  >>> 13h 30m 15s
  766.    */
  767.     psz = zdtFormatDate( date, sz, zdtNOSEPARATOR,
  768.               "%%Hh %%Mm %%Ss" ) ;
  769.  
  770.    /*
  771.    **  The following call returns a pointer to string "sz"
  772.    **
  773.    **  >>> Time is 13 30 15
  774.    */
  775.     psz = zdtFormatDate( date, sz, zdtNOSEPARATOR,
  776.               "%s %%H %%M %%S","Time is" ) ;
  777.  
  778.    /*
  779.    **  The following call returns a pointer to string "sz"
  780.    **
  781.    **  >>> 13:15.25
  782.    */
  783.     psz = zdtFormatDate( date, sz, ':',
  784.               "%%H%%s%%M%%s%%S.%ul",25 ) ;
  785.  
  786.    /*
  787.    **  The following call returns a pointer to string "sz"
  788.    **
  789.    **  >>> %13-30-15% %z %
  790.    */
  791.     psz = zdtFormatDate( date, sz, '-',
  792.               "%%%%H%%s%%M%%s%%S%% %%z %c",'%' ) ;
  793.  
  794.  As you can see in the previous examples, time, the pointer to the target 
  795.  string (allocated by the caller), and the time separator are provided before 
  796.  the template, whereas all the parameters related to the C format 
  797.  specifications follow the template in the function parameter list. 
  798.  
  799.  If no separator has to be used, you may use the pre-defined value 
  800.  zdtNOSEPARATOR. 
  801.  
  802.  
  803. ΓòÉΓòÉΓòÉ 4.3. Advanced topics ΓòÉΓòÉΓòÉ
  804.  
  805. Select one: 
  806.  
  807. Γûá Machine Readable Information
  808. Γûá Signal handling
  809. Γûá Create your own library
  810. Γûá How to generate the clone
  811. Γûá How to use the object library
  812.  
  813.  
  814. ΓòÉΓòÉΓòÉ 4.3.1. Machine Readable Information ΓòÉΓòÉΓòÉ
  815.  
  816. If the library contains translatable pieces of information, they are contained 
  817. in resource files available in the MRI sub-directory of the ZDT directory, 
  818. created at installation time (see Installation). 
  819.  
  820. To use such files, move all the header files in the H sub-directory to the 
  821. appropriate path in your development environment, translate the resource files 
  822. to the target language, recompile the file by using the command 
  823.  
  824.  rc -r <resource>.RC
  825.  
  826. to generate the corresponding RES file, and apply the result to the DLL file by 
  827. using the command 
  828.  
  829.  rc <resource>.RES <name>.DLL
  830.  
  831. Note that <name> is not FMZDTFUN but the name of the DLL cloned as described in 
  832. Create your own library. 
  833.  
  834.  
  835. ΓòÉΓòÉΓòÉ 4.3.2. Signal handling ΓòÉΓòÉΓòÉ
  836.  
  837. FMZDTFUN.DLL enables the handling of signals as follows. 
  838.  
  839. First, each exported function is preceeded in code by the corresponding pragma 
  840. handler: 
  841.  
  842. Sample 
  843.  
  844.  #pragma handler(zdtLibraryVersion)
  845.  
  846.  VOID EXPENTRY zdtLibraryVersion
  847.   .
  848.   .
  849.   .
  850.  
  851. Second, a standard function, available in any Z Family/2 reusable library, is 
  852. provided to register a user's signal handler: zdtRegisterSignal (see 
  853. zdtRegisterSignal). 
  854.  
  855. The user's signal handler is a function that accepts as input parameter an 
  856. integer, and returns a void. A sample is shown hereinafter: 
  857.  
  858. Sample 
  859.  
  860.  void UserSignalHandler (int signal)
  861.  {
  862.   switch (signal)
  863.   {
  864.    case SIGILL  : /* Prepare to handle SIGILL  */ break ;
  865.    case SIGSEGV : /* Prepare to handle SIGSEGV  */ break ;
  866.    case SIGFPE  : /* Prepare to handle SIGFPE  */ break ;
  867.    case SIGTERM : /* Prepare to handle SIGTERM  */ break ;
  868.    case SIGABRT : /* Prepare to handle SIGABRT  */ break ;
  869.    case SIGINT  : /* Prepare to handle SIGINT  */ break ;
  870.    case SIGUSR1 : /* Prepare to handle SIGUSR1  */ break ;
  871.    case SIGUSR2 : /* Prepare to handle SIGUSR2  */ break ;
  872.    case SIGUSR3 : /* Prepare to handle SIGUSR3  */ break ;
  873.    case SIGBREAK: /* Prepare to handle SIGBREAK */ break ;
  874.    default    : /* Unknown signal       */ break ;
  875.   }
  876.  
  877.   /*
  878.   **  Handle the received signal according to the previous
  879.   **  preparation. In general, show a message and terminate
  880.   **  the program.
  881.   */
  882.  
  883.  }
  884.  
  885.  
  886. ΓòÉΓòÉΓòÉ 4.3.3. Create your own library ΓòÉΓòÉΓòÉ
  887.  
  888. It is possible for the reuser to decide to clone a Z Family/2 reusable library 
  889. with a different name.  Since the source code is not available to reusers, it 
  890. is possible to do that by using the files in the DEVEL sub-directory. 
  891.  
  892.    Important Such files are not intended to be used as they are, but should be 
  893.    modified as described below. 
  894.  
  895.  The DEVEL directory contains at least  eight files. The first four are: 
  896.  
  897.  ZDTFUNCS.LIB        An object library 
  898.  ZDTFUNCS.DEF        A skeleton for the definition file 
  899.  ZDTCLONE.MAK        A skeleton for the make file 
  900.  ZDTSTUB.C           A stub file used to generate the library 
  901.  
  902.  The others are needed to create a country dependent dynamic link library 
  903.  containing the names of the months and weekdays. They are: 
  904.  
  905.  ZDTRSENG.RES        The resource file for the name of months and weekdays in 
  906.                      English 
  907.  ZDTRSENG.DEF        The definition file for creating a country dependent 
  908.                      library. 
  909.  ZDTRSRCS.MAK        The make file to generate a country dependent library. 
  910.  ZDTRSRCS.C          A stub file used to generate the country dependent 
  911.                      library. 
  912.  
  913.  In addition, it may also contain one or more resource files, that is 
  914.  ZDTxxxxx.RES files. 
  915.  
  916.    Important 
  917.  
  918.    This library may need to load resources from itself, or to get its module 
  919.    handle. If you clone the library and change its name, it has no way to 
  920.    automatically know which is its new name. So you need to tell it about. You 
  921.    can do that by using the zdtSetLibraryName() function. 
  922.  
  923.  
  924. ΓòÉΓòÉΓòÉ 4.3.4. How to generate the clone ΓòÉΓòÉΓòÉ
  925.  
  926. To generate a clone of FMZDTFUN.DLL with a different name, you have to execute 
  927. the following steps: 
  928.  
  929.   1. Edit ZDTCLONE.MAK (see Skeleton of a makefile to clone a Z Family/2 DLL) 
  930.      changing USRNAME to the wanted name. Let's say, for example, DLLCLONE. You 
  931.      may want to add other instructions to this make file, but be careful if 
  932.      you want to change the existing ones In particular, the OPTIONS constant 
  933.      contains the same options used to compile FMZDTFUN.DLL. If you change 
  934.      them, the new DLL may not work as expected. 
  935.  
  936.      Skeleton of a makefile to clone a Z Family/2 DLL 
  937.  
  938.           #
  939.           #  Module   : ZxxCLONE.MAK
  940.           #  Authors  : Luca Miccoli (MICCOLI at ROMEPPC)
  941.           #  Reviewer  : Dario de Judicibus (DEJUDICI at ROMEPPC)
  942.           #  Created  : 06 Apr 1993
  943.           #  Reviewed  : 21 Apr 1993
  944.           #  Version  : 1.00
  945.           #  Content  : Make File for Z Family/2 Clones
  946.           #
  947.           #  ------------------------------------------------------------------------------
  948.           #
  949.           #  NOTE : This is a SAMPLE makefile. You may need to modify it to satisfy your
  950.           #     specific needs. You may also want to include it in a larger MAKE file
  951.           #     which is used to generate your application. In any case, read carefully
  952.           #     the comments below and the "User's Guide", to understand what you can
  953.           #     change, and what should be used as is.
  954.           #  ------------------------------------------------------------------------------
  955.  
  956.           #
  957.           #  User provided name of the .DLL (to be filled)
  958.           #
  959.           USRNAME = ________
  960.  
  961.           STBNAME = zxxstub
  962.           INTNAME = zxxfuncs
  963.           RESNAME = zxxrsrcs
  964.  
  965.           #
  966.           #  Do not change OPTIONS unless really needed. They SHOULD match the original ones.
  967.           #
  968.           OPTIONS = /Kb /Ge- /Sm /Ss /Gd- /Gm+ /Ms /I-
  969.           LINKOPT = /NOI
  970.  
  971.           #
  972.           #  MAKE file generates a DLL and the corresponding IMPORT library having the
  973.           #  name specified as USRNAME above.
  974.           #
  975.           all: $(USRNAME).dll $(USRNAME).lib
  976.  
  977.           #
  978.           #  STUB should be compiled by using the same options used for Z Family/2 DLL
  979.           #
  980.           $(STBNAME).obj: $(STBNAME).c
  981.             icc /C+ $(OPTIONS) $(STBNAME).c
  982.  
  983.           #
  984.           #  Use STUB and Z Family/2 OBJECT library to generate the User's Cloned DLL
  985.           #  Use $(INTNAME).def to make your $(USRNAME).def, changing the name after
  986.           #  LIBRARY (first instruction of the definition file).
  987.           #
  988.           $(USRNAME).dll: $(STBNAME).obj $(INTNAME).lib $(USRNAME).def $(RESNAME).res
  989.            link386 $(LINKOPT) $(STBNAME).obj,$(USRNAME).dll,,$(INTNAME).lib,$(USRNAME).def ;
  990.            rc $(RESNAME).res $(USRNAME).dll
  991.  
  992.           #
  993.           #  Use the User's Cloned DLL to generate the corresponding IMPORT library
  994.           #
  995.           $(USRNAME).lib: $(USRNAME).dll $(USRNAME).def
  996.            implib $(USRNAME).lib $(USRNAME).def
  997.  
  998.   2. Edit ZDTFUNCS.DEF (see Skeleton of a definition to clone a Z Family/2 DLL) 
  999.      changing the name after LIBRARY  keyword to the wanted name, that is, 
  1000.      DLLCLONE. 
  1001.  
  1002.      Skeleton of a definition to clone a Z Family/2 DLL 
  1003.  
  1004.           ;
  1005.           ; Module   : ZxxFUNCS.DEF
  1006.           ; Authors  : Dario de Judicibus (DEJUDICI at ROMEPPC)
  1007.           ;       Mario Turaccio (TURACCIO at ROMEPPC)
  1008.           ; Reviewer  : Dario de Judicibus (DEJUDICI at ROMEPPC)
  1009.           ; Created  : 21 Oct 1991
  1010.           ; Updated  : 01 Apr 1993
  1011.           ; Version  : 1.00
  1012.           ; Content  : Module Definition File for FMZLXFUN.DLL
  1013.           ; Product  : Z Family/2 Project (5641-504) FMZ
  1014.           ;
  1015.  
  1016.           LIBRARY FMZxxFUN INITINSTANCE TERMINSTANCE
  1017.           DESCRIPTION '... , Z Family/2 5641-504 (C) Copyright IBM Corporation 1993,1994.'
  1018.  
  1019.           PROTMODE
  1020.           CODE  LOADONCALL
  1021.           DATA  MULTIPLE READWRITE NONSHARED
  1022.           HEAPSIZE  32768
  1023.           STACKSIZE 32768
  1024.  
  1025.           IMPORTS
  1026.                FMZyyFUN.zgsLibraryVersion
  1027.                FMZyyFUN.zgsRegisterSignal
  1028.                ...
  1029.           EXPORTS
  1030.                zxxLibraryVersion
  1031.                zxxRegisterSignal
  1032.                ...
  1033.  
  1034.   3. Generate the new DLL by executing: 
  1035.  
  1036.            NMAKE - af ZDTCLONE.MAK
  1037.  
  1038.  
  1039. ΓòÉΓòÉΓòÉ 4.3.5. How to use the object library ΓòÉΓòÉΓòÉ
  1040.  
  1041. An object library called ZDTFUNCS.LIB is available in DEVEL sub-directory. 
  1042.  
  1043. Such a library is provided to allow the user to clone the FMZDTFUN.DLL library, 
  1044. as explained in Create your own library. 
  1045.  
  1046.    Important 
  1047.  
  1048.    You may also decide to clone only few function rather than the whole 
  1049.    library. However you cannot use this library to statically link some library 
  1050.    function to your program. In fact, those functions which may need to load 
  1051.    resources from the DLL itself, or to get the library handle to perform 
  1052.    specific activities, wouldn't work any more. This use of the object library 
  1053.    is not supported. You may do that, but at your own risk. 
  1054.  
  1055.  
  1056. ΓòÉΓòÉΓòÉ 5. Reference Manual ΓòÉΓòÉΓòÉ
  1057.  
  1058. Select one: 
  1059.  
  1060.  Function sheets 
  1061.  
  1062.  Macro sheets 
  1063.  
  1064.  Data sheets 
  1065.  
  1066.  
  1067. ΓòÉΓòÉΓòÉ 5.1. Function sheets ΓòÉΓòÉΓòÉ
  1068.  
  1069. Select one: 
  1070.  
  1071. Γûá zdtLibraryVersion
  1072. Γûá zdtSetLibraryName
  1073. Γûá zdtRegisterSignal
  1074. Γûá zdtAddDays
  1075. Γûá zdtAddHours
  1076. Γûá zdtAddMinutes
  1077. Γûá zdtAddSeconds
  1078. Γûá zdtAddToDate
  1079. Γûá zdtAsJulian
  1080. Γûá zdtComputeLocalTime
  1081. Γûá zdtCurLangId
  1082. Γûá zdtDateAsString
  1083. Γûá zdtDay
  1084. Γûá zdtDayOfYear
  1085. Γûá zdtDaysBetween
  1086. Γûá zdtDaysInMonth
  1087. Γûá zdtDayInYear
  1088. Γûá zdtDefLangId
  1089. Γûá zdtDiscardDate
  1090. Γûá zdtDiscardTime
  1091. Γûá zdtFormatDate
  1092. Γûá zdtFormatTime
  1093. Γûá zdtGetLangId
  1094. Γûá zdtHours
  1095. Γûá zdtIsLeapYear
  1096. Γûá zdtIsValidDate
  1097. Γûá zdtIsValidTime
  1098. Γûá zdtIsValidZone
  1099. Γûá zdtLanguage
  1100. Γûá zdtLocalZone
  1101. Γûá zdtMinutes
  1102. Γûá zdtMinutesInTime
  1103. Γûá zdtMonth
  1104. Γûá zdtMonthAsString
  1105. Γûá zdtMonthName
  1106. Γûá zdtNewDate
  1107. Γûá zdtNewTime
  1108. Γûá zdtNow
  1109. Γûá zdtSeconds
  1110. Γûá zdtSecondsBetween
  1111. Γûá zdtSecondsInTime
  1112. Γûá zdtSetLanguage
  1113. Γûá zdtStringAsDate
  1114. Γûá zdtStringAsTime
  1115. Γûá zdtStringIsDate
  1116. Γûá zdtStringIsTime
  1117. Γûá zdtTimeAsString
  1118. Γûá zdtToday
  1119. Γûá zdtUtcNow
  1120. Γûá zdtUtcToday
  1121. Γûá zdtWeekday
  1122. Γûá zdtWeekdayAsString
  1123. Γûá zdtWeekdayName
  1124. Γûá zdtWeekOfYear
  1125. Γûá zdtYear
  1126.  
  1127.  
  1128. ΓòÉΓòÉΓòÉ 5.1.1. zdtLibraryVersion ΓòÉΓòÉΓòÉ
  1129.  
  1130. Provide information about library version and the date and time of compilation 
  1131. of the DLL source code. 
  1132.  
  1133. Prototype 
  1134.  
  1135.  VOID EXPENTRY zdtLibraryVersion
  1136.  (
  1137.   zPLIBVERS pLibVers
  1138.  ) ;
  1139.  
  1140. Parameters 
  1141.  
  1142.  pLibVers 
  1143.       Pointer to a zLIBVERS structure. That structure should be allocated by 
  1144.       the caller. Its content, if any, will be overwritten. 
  1145.  
  1146.  result 
  1147.       The zLIBVERS structure whose pointer is provided as input parameter is 
  1148.       filled. 
  1149.  
  1150.  Notes 
  1151.  
  1152.  Look at zLIBVERS for the definition of zLIBVERS structure. 
  1153.  
  1154.  Known bugs 
  1155.  
  1156.  None. 
  1157.  
  1158.  
  1159. ΓòÉΓòÉΓòÉ 5.1.2. zdtSetLibraryName ΓòÉΓòÉΓòÉ
  1160.  
  1161. Set the value of the private variable zdtDllName. See also Create your own 
  1162. library. 
  1163.  
  1164.    Important If called, this function must be called before any other library 
  1165.    function. 
  1166.  
  1167.  Prototype 
  1168.  
  1169.    VOID EXPENTRY zdtSetLibraryName
  1170.    (
  1171.     PSZ szNewName
  1172.    ) ;
  1173.  
  1174.  Parameters 
  1175.  
  1176.  szNewName 
  1177.       Pointer to the string containing the new name of library. If you pass a 
  1178.       NULL pointer or an empty string, the library name is set to its default, 
  1179.       that is zdtDLLNAME. 
  1180.  
  1181.  result 
  1182.       None. 
  1183.  
  1184.  Notes 
  1185.  
  1186.  If you clone FMZDTFUN.DLL, you obtain a new library with a new name. Since 
  1187.  this library may need to know its name to load resources or get its module 
  1188.  handle, you have to tell it which is the new name. You can use this function 
  1189.  to do that. The default name is zdtDLLNAME. 
  1190.  
  1191.  Known bugs 
  1192.  
  1193.  None. 
  1194.  
  1195.  
  1196. ΓòÉΓòÉΓòÉ 5.1.3. zdtRegisterSignal ΓòÉΓòÉΓòÉ
  1197.  
  1198. It allows to register an application signal handler for exception handling. 
  1199.  
  1200. Prototype 
  1201.  
  1202.  zSIGNAL EXPENTRY zdtRegisterSignal
  1203.  (
  1204.   zSIGHAND  SigHandler
  1205.  )
  1206.  
  1207. Parameters 
  1208.  
  1209.  SigHandler 
  1210.       Pointer to the application signal handler to be registered.  Type is 
  1211.       zSIGHAND (see Z Family/2 general constants). 
  1212.  
  1213.  result 
  1214.       zREGISTERED if the handler has been successfully registered, otherwise it 
  1215.       returns the signal for which the registration failed.  See Signal 
  1216.       handling types for the complete list of signals and their meaning. 
  1217.  
  1218.  Notes 
  1219.  
  1220.  Look at Signal handling  for a description of the exception handling feature 
  1221.  provided by FMZDTFUN.DLL. 
  1222.  
  1223.  Known bugs 
  1224.  
  1225.  None. 
  1226.  
  1227.  
  1228. ΓòÉΓòÉΓòÉ 5.1.4. zdtAddDays ΓòÉΓòÉΓòÉ
  1229.  
  1230. Return the date of the day which occurs a certain number of days after/before a 
  1231. specified date. 
  1232.  
  1233. Prototype 
  1234.  
  1235.  zdtDATE EXPENTRY zdtAddDays
  1236.  (
  1237.   zdtDATE  date ,
  1238.   zdtDAYS  days
  1239.  )
  1240.  
  1241. Parameters 
  1242.  
  1243.  date 
  1244.       A date, provided in the internal representation (as generated by 
  1245.       zdtNewDate()). 
  1246.  
  1247.  days 
  1248.       An integer which represents the offset of the requested date with respect 
  1249.       the provided one. It might be negative too. 
  1250.  
  1251.  result 
  1252.       The date which occurs a certain number of days after/before the specified 
  1253.       date. See also Valid ranges. 
  1254.  
  1255.  Notes 
  1256.  
  1257.  No check is made if the resulting date is still valid. It might be out of the 
  1258.  valid range too. 
  1259.  
  1260.  Known bugs 
  1261.  
  1262.  None. 
  1263.  
  1264.  
  1265. ΓòÉΓòÉΓòÉ 5.1.5. zdtAddHours ΓòÉΓòÉΓòÉ
  1266.  
  1267. Return the time which occurs a certain number of hours after/before a specified 
  1268. time. If the new time belongs to a different day than the specified one, a day 
  1269. shift value is returned. 
  1270.  
  1271. Prototype 
  1272.  
  1273.  zdtTIME EXPENTRY zdtAddHours
  1274.  (
  1275.   zdtTIME  time  ,
  1276.   zdtHOURS  hours ,
  1277.   zdtDAYS  *shift
  1278.  )
  1279.  
  1280. Parameters 
  1281.  
  1282.  time 
  1283.       A time, provided in the internal representation (as generated by 
  1284.       zdtNewTime()). 
  1285.  
  1286.  hours 
  1287.       An integer which represents the difference in hours between the requested 
  1288.       time and the provided one. It might be negative too. 
  1289.  
  1290.  shift 
  1291.       The pointer to an integer value which will contain the day shift, if any. 
  1292.       Returned integer might be negative too. 
  1293.  
  1294.  result 
  1295.       The time which occurs a certain number of hours after/before the 
  1296.       specified time. If date changes too, the day shift is returned in shift. 
  1297.       See also Valid ranges. 
  1298.  
  1299.  Notes 
  1300.  
  1301.  If the day changes too, the caller may obtain the new date by using the 
  1302.  zdtAddDays() function, if interested. 
  1303.  
  1304.  Known bugs 
  1305.  
  1306.  None. 
  1307.  
  1308.  
  1309. ΓòÉΓòÉΓòÉ 5.1.6. zdtAddMinutes ΓòÉΓòÉΓòÉ
  1310.  
  1311. Return the time which occurs a certain number of minutes after/before a 
  1312. specified time. If the new time belongs to a different day than the specified 
  1313. one, a day shift value is returned. 
  1314.  
  1315. Prototype 
  1316.  
  1317.  zdtTIME EXPENTRY zdtAddMinutes
  1318.  (
  1319.   zdtTIME   time   ,
  1320.   zdtMINUTES  minutes ,
  1321.   zdtDAYS   *shift
  1322.  )
  1323.  
  1324. Parameters 
  1325.  
  1326.  time 
  1327.       A time, provided in the internal representation (as generated by 
  1328.       zdtNewTime()). 
  1329.  
  1330.  minutes 
  1331.       An integer which represents the difference in minutes between the 
  1332.       requested time and the provided one. It might be negative too. 
  1333.  
  1334.  shift 
  1335.       The pointer to an integer value which will contain the day shift, if any. 
  1336.       Returned integer might be negative too. 
  1337.  
  1338.  result 
  1339.       The time which occurs a certain number of minutes after/before the 
  1340.       specified time. If date changes too, the day shift is returned in shift. 
  1341.       See also Valid ranges. 
  1342.  
  1343.  Notes 
  1344.  
  1345.  If the day changes too, the caller may obtain the new date by using the 
  1346.  zdtAddDays() function, if interested. 
  1347.  
  1348.  Known bugs 
  1349.  
  1350.  None. 
  1351.  
  1352.  
  1353. ΓòÉΓòÉΓòÉ 5.1.7. zdtAddSeconds ΓòÉΓòÉΓòÉ
  1354.  
  1355. Return the time which occurs a certain number of seconds after/before a 
  1356. specified time. If the new time belongs to a different day than the specified 
  1357. one, a day shift value is returned. 
  1358.  
  1359. Prototype 
  1360.  
  1361.  zdtTIME EXPENTRY zdtAddSeconds
  1362.  (
  1363.   zdtTIME   time   ,
  1364.   zdtSECONDS  seconds ,
  1365.   zdtDAYS   *shift
  1366.  )
  1367.  
  1368. Parameters 
  1369.  
  1370.  time 
  1371.       A time, provided in the internal representation (as generated by 
  1372.       zdtNewTime()). 
  1373.  
  1374.  seconds 
  1375.       An integer which represents the difference in seconds between the 
  1376.       requested time and the provided one. It might be negative too. 
  1377.  
  1378.  shift 
  1379.       The pointer to an integer value which will contain the day shift, if any. 
  1380.       Returned integer might be negative too. 
  1381.  
  1382.  result 
  1383.       The time which occurs a certain number of seconds after/before the 
  1384.       specified time. If date changes too, the day shift is returned in shift. 
  1385.       See also Valid ranges. 
  1386.  
  1387.  Notes 
  1388.  
  1389.  If the day changes too, the caller may obtain the new date by using the 
  1390.  zdtAddDays() function, if interested. 
  1391.  
  1392.  Known bugs 
  1393.  
  1394.  None. 
  1395.  
  1396.  
  1397. ΓòÉΓòÉΓòÉ 5.1.8. zdtAddToDate ΓòÉΓòÉΓòÉ
  1398.  
  1399. Return the date that is obtained by adding a certain number of days and/or 
  1400. months and/or years to the specified date. See the notes below for the logic 
  1401. used by this function. 
  1402.  
  1403. Prototype 
  1404.  
  1405.  zdtDATE EXPENTRY zdtAddToDate
  1406.  (
  1407.   zdtDATE  date   ,
  1408.   ULONG   years  ,
  1409.   ULONG   months  ,
  1410.   ULONG   days
  1411.  )
  1412.  
  1413. Parameters 
  1414.  
  1415.  date 
  1416.       A date, provided in the internal representation (as generated by 
  1417.       zdtNewDate()). 
  1418.  
  1419.  years 
  1420.       The number of years to be added to the specified date. 
  1421.  
  1422.  months 
  1423.       The number of months to be added to the specified date. 
  1424.  
  1425.  days 
  1426.       The number of days to be added to the specified date. 
  1427.  
  1428.  result 
  1429.       The date which occurs a certain number of days, months, and years after 
  1430.       specified date. If the incoming date is not valid, returns zdtINVALID. 
  1431.       See also Valid ranges. 
  1432.  
  1433.  Notes 
  1434.  
  1435.  Note that, differently from zdtAddDays(), this function does not add a fixed 
  1436.  number of days to the specified date, but a total amount of days which depends 
  1437.  on the initial date and on the order in which addends are applied. 
  1438.  
  1439.  For example, adding one month to January 2nd, 1993, to obtain February 2nd, 
  1440.  1993 is equivalent to add 31 days. On the other side, adding one month to 
  1441.  February 2nd, 1993 to obtain March 2nd, 1993 is equivalent to add 28 days. 
  1442.  
  1443.  Furthermore, we must be careful when we consider in which order the addends 
  1444.  should be applied to the initial date. In fact, let's suppose that we want to 
  1445.  add fifteen days, one month and one year to February 18th, 1991. 
  1446.  
  1447.  If we add first the days, we obtain March 5th, 1991. Now, adding one month and 
  1448.  one year, we respectively obtain April 5th, 1991 and April 5th, 1992. However, 
  1449.  if we add first one year, we obtain February 18th, 1992. Now, since 1992 is a 
  1450.  leap year, adding fifteen days to such a date, we obtain March 4th, 1991. The 
  1451.  final result, obtained by adding one month, is therefore April 4th, 1992. 
  1452.  
  1453.    Important 
  1454.  
  1455.    zdtAddToDate() adds first the days, then the months, and last the years. 
  1456.    Take in account such logic when you use it. 
  1457.  
  1458.  No check is made if the resulting date is still valid. It might be out of the 
  1459.  valid range too. 
  1460.  
  1461.  Known bugs 
  1462.  
  1463.  None. 
  1464.  
  1465.  
  1466. ΓòÉΓòÉΓòÉ 5.1.9. zdtAsJulian ΓòÉΓòÉΓòÉ
  1467.  
  1468. Return the Julian day of the specified date. See Definitions and formats for 
  1469. details about date formats. 
  1470.  
  1471. Prototype 
  1472.  
  1473.  zdtDAYS EXPENTRY zdtAsJulian
  1474.  (
  1475.   zdtDATE  date
  1476.  )
  1477.  
  1478. Parameters 
  1479.  
  1480.  date 
  1481.       A date, provided in the internal representation (as generated by 
  1482.       zdtNewDate()). 
  1483.  
  1484.  result 
  1485.       The Julian day for the specified date (provided in the internal format), 
  1486.       or zdtINVALID if the date is incorrect. 
  1487.  
  1488.  Notes 
  1489.  
  1490.  Note that the Julian day returned by this function includes the last two 
  1491.  digits of the year too. Thence it is not unique among different centuries. For 
  1492.  example 72015 corresponds to either January 15th, 1972 or January 15th, 1672. 
  1493.  
  1494.  Known bugs 
  1495.  
  1496.  None. 
  1497.  
  1498.  
  1499. ΓòÉΓòÉΓòÉ 5.1.10. zdtComputeLocalTime ΓòÉΓòÉΓòÉ
  1500.  
  1501. Return the date and time corresponding to a specific time zone, given the 
  1502. corresponding time zone value, and the date, time and zone values of another 
  1503. time zone. 
  1504.  
  1505. Prototype 
  1506.  
  1507.  BOOL EXPENTRY zdtComputeLocalTime
  1508.  (
  1509.   zdtLOCALDT *dta ,
  1510.   zdtLOCALDT *dtb
  1511.  )
  1512.  
  1513. Parameters 
  1514.  
  1515.  dta 
  1516.       The pointer to a structure which contains the date, time and zone values 
  1517.       of a specific time zone. 
  1518.  
  1519.  dtb 
  1520.       The pointer to a structure which contains the zone value of another time 
  1521.       zone, whose date and time are unknown. 
  1522.  
  1523.  result 
  1524.       The date and time fields of the structure pointed by dtb are filled and 
  1525.       TRUE is returned if the operation has been performed successfully. 
  1526.       Otherwise the function returns FALSE and the target structure is not 
  1527.       filled. 
  1528.  
  1529.  Notes 
  1530.  
  1531.  See zdtLOCALDT for details about the zdtLOCALDT structure. 
  1532.  
  1533.  Known bugs 
  1534.  
  1535.  None. 
  1536.  
  1537.  
  1538. ΓòÉΓòÉΓòÉ 5.1.11. zdtCurLangId ΓòÉΓòÉΓòÉ
  1539.  
  1540. Return the language identifier corresponding to language currently set (see NLS 
  1541. considerations). 
  1542.  
  1543. Prototype 
  1544.  
  1545.  PSZ EXPENTRY zdtCurLangId
  1546.  (
  1547.   VOID
  1548.  )
  1549.  
  1550. Parameters 
  1551.  
  1552.  (void) 
  1553.       No arguments are needed. 
  1554.  
  1555.  result 
  1556.       The current language identifier. 
  1557.  
  1558.  Notes 
  1559.  
  1560.  At the beginning the current language corresponds to the default language. 
  1561.  Setting can be changed by zdtSetLanguage(). 
  1562.  
  1563.  Known bugs 
  1564.  
  1565.  None. 
  1566.  
  1567.  
  1568. ΓòÉΓòÉΓòÉ 5.1.12. zdtDateAsString ΓòÉΓòÉΓòÉ
  1569.  
  1570. Return a pointer to a string with the date in the sorted format, that is 
  1571. yyyymmdd. See Definitions and formats for details about date formats. 
  1572.  
  1573. Prototype 
  1574.  
  1575.  PSZ EXPENTRY zdtDateAsString
  1576.  (
  1577.   zdtDATE  date  ,
  1578.   PSZ    sorted
  1579.  )
  1580.  
  1581. Parameters 
  1582.  
  1583.  date 
  1584.       A date, provided in the internal representation (as generated by 
  1585.       zdtNewDate()). 
  1586.  
  1587.  sorted 
  1588.       The pointer to the string to be filled by the function. It should be 9 
  1589.       bytes long, at least. 
  1590.  
  1591.  result 
  1592.       The pointer to a string containing the sorted format of the date, or 
  1593.       zdtNOTFORMATTED if date is not valid. 
  1594.  
  1595.  Notes 
  1596.  
  1597.  This function is NLS enabled since it doesn't contain any date separator. 
  1598.  
  1599.  Note that this function cannot perform any check on the size of the target 
  1600.  string. It is caller's responsibility to guarantee a string length large 
  1601.  enough to contain the formatted date. 
  1602.  
  1603.  Known bugs 
  1604.  
  1605.  None. 
  1606.  
  1607.  
  1608. ΓòÉΓòÉΓòÉ 5.1.13. zdtDay ΓòÉΓòÉΓòÉ
  1609.  
  1610. Return the day of the month for the specified date. 
  1611.  
  1612. Prototype 
  1613.  
  1614.  zdtDAY EXPENTRY zdtDay
  1615.  (
  1616.   zdtDATE  date
  1617.  )
  1618.  
  1619. Parameters 
  1620.  
  1621.  date 
  1622.       A date, provided in the internal representation (as generated by 
  1623.       zdtNewDate()). 
  1624.  
  1625.  result 
  1626.       The day of month for the specified date (provided in the internal 
  1627.       format), or zdtINVALID if the date is incorrect. The day of month is a 
  1628.       number between 1 and 28, 29, 30 or 31, depending on the month and if the 
  1629.       year is leap. See also Valid ranges. 
  1630.  
  1631.  Notes 
  1632.  
  1633.  None. 
  1634.  
  1635.  Known bugs 
  1636.  
  1637.  None. 
  1638.  
  1639.  
  1640. ΓòÉΓòÉΓòÉ 5.1.14. zdtDayOfYear ΓòÉΓòÉΓòÉ
  1641.  
  1642. Return the day of year of the provided date. 
  1643.  
  1644. Prototype 
  1645.  
  1646.  zdtDAYS EXPENTRY zdtDayOfYear
  1647.  (
  1648.   zdtDATE  date
  1649.  )
  1650.  
  1651. Parameters 
  1652.  
  1653.  date 
  1654.       A date, provided in the internal representation (as generated by 
  1655.       zdtNewDate()). 
  1656.  
  1657.  result 
  1658.       The day of year of the provided date, or zdtINVALID if the date is 
  1659.       invalid. 
  1660.  
  1661.  Notes 
  1662.  
  1663.  None. 
  1664.  
  1665.  Known bugs 
  1666.  
  1667.  None. 
  1668.  
  1669.  
  1670. ΓòÉΓòÉΓòÉ 5.1.15. zdtDaysBetween ΓòÉΓòÉΓòÉ
  1671.  
  1672. Return the number of days between two dates. 
  1673.  
  1674. Prototype 
  1675.  
  1676.  zdtDAYS EXPENTRY zdtDaysBetween
  1677.  (
  1678.   zdtDATE  date1 ,
  1679.   zdtDATE  date2
  1680.  )
  1681.  
  1682. Parameters 
  1683.  
  1684.  date1 
  1685.       A earlier date, provided in the internal representation (as generated by 
  1686.       zdtNewDate()). 
  1687.  
  1688.  date2 
  1689.       A older date, provided in the internal representation (as generated by 
  1690.       zdtNewDate()). 
  1691.  
  1692.  result 
  1693.       The number of days between the two dates. 
  1694.  
  1695.  Notes 
  1696.  
  1697.  No check is done if date1 > date2. Then the result might be a negative number 
  1698.  too. 
  1699.  
  1700.  Known bugs 
  1701.  
  1702.  None. 
  1703.  
  1704.  
  1705. ΓòÉΓòÉΓòÉ 5.1.16. zdtDaysInMonth ΓòÉΓòÉΓòÉ
  1706.  
  1707. Return the number of days in a particular month in a particular year. 
  1708.  
  1709. Prototype 
  1710.  
  1711.  zdtDAYS EXPENTRY zdtDaysInMonth
  1712.  (
  1713.   zdtYEAR  year  ,
  1714.   zdtMONTH month
  1715.  )
  1716.  
  1717. Parameters 
  1718.  
  1719.  year 
  1720.       Date year. It must be a number between zdtBASEYEAR (included)  and 
  1721.       zdtLASTYEAR (excluded). See also Valid ranges. 
  1722.  
  1723.  month 
  1724.       Date month. It must be a number between JANUARY and DECEMBER included. 
  1725.       See also Valid ranges. 
  1726.  
  1727.  result 
  1728.       The number of days in the month, adjusted for leap years. 
  1729.  
  1730.  Notes 
  1731.  
  1732.  None. 
  1733.  
  1734.  Known bugs 
  1735.  
  1736.  None. 
  1737.  
  1738.  
  1739. ΓòÉΓòÉΓòÉ 5.1.17. zdtDaysInYear ΓòÉΓòÉΓòÉ
  1740.  
  1741. Return the number of days in a particular year. 
  1742.  
  1743. Prototype 
  1744.  
  1745.  zdtDAYS EXPENTRY zdtDaysInYear
  1746.  (
  1747.   zdtYEAR  year
  1748.  )
  1749.  
  1750. Parameters 
  1751.  
  1752.  year 
  1753.       Date year. It must be a number between zdtBASEYEAR (included)  and 
  1754.       zdtLASTYEAR (excluded). See also Valid ranges. 
  1755.  
  1756.  result 
  1757.       The number of days in the year, adjusted for leap years. 
  1758.  
  1759.  Notes 
  1760.  
  1761.  None. 
  1762.  
  1763.  Known bugs 
  1764.  
  1765.  None. 
  1766.  
  1767.  
  1768. ΓòÉΓòÉΓòÉ 5.1.18. zdtDefLangId ΓòÉΓòÉΓòÉ
  1769.  
  1770. Return the default language identifier, whatever be the current setting (see 
  1771. NLS considerations). 
  1772.  
  1773. Prototype 
  1774.  
  1775.  PSZ EXPENTRY zdtDefLangId
  1776.  (
  1777.   VOID
  1778.  )
  1779.  
  1780. Parameters 
  1781.  
  1782.  (void) 
  1783.       No arguments are needed. 
  1784.  
  1785.  result 
  1786.       The default language identifier. 
  1787.  
  1788.  Notes 
  1789.  
  1790.  None. 
  1791.  
  1792.  Known bugs 
  1793.  
  1794.  None. 
  1795.  
  1796.  
  1797. ΓòÉΓòÉΓòÉ 5.1.19. zdtDiscardDate ΓòÉΓòÉΓòÉ
  1798.  
  1799. Date destructor (as opposed to zdtNewDate()). Currently does nothing. Reserved 
  1800. for future usage. 
  1801.  
  1802. Prototype 
  1803.  
  1804.  VOID EXPENTRY zdtDiscardDate
  1805.  (
  1806.   zdtDATE  date
  1807.  )
  1808.  
  1809. Parameters 
  1810.  
  1811.  date 
  1812.       A date, provided in the internal representation (as generated by 
  1813.       zdtNewDate()). 
  1814.  
  1815.  result 
  1816.       None. 
  1817.  
  1818.  Notes 
  1819.  
  1820.  This function is useless, at the moment. It is reserved for future usage as 
  1821.  date destructor. You may ignore it. 
  1822.  
  1823.  Known bugs 
  1824.  
  1825.  None. 
  1826.  
  1827.  
  1828. ΓòÉΓòÉΓòÉ 5.1.20. zdtDiscardTime ΓòÉΓòÉΓòÉ
  1829.  
  1830. Time destructor (as opposed to zdtNewTime()). Currently does nothing. Reserved 
  1831. for future usage. 
  1832.  
  1833. Prototype 
  1834.  
  1835.  VOID EXPENTRY zdtDiscardTime
  1836.  (
  1837.   zdtTIME  time
  1838.  )
  1839.  
  1840. Parameters 
  1841.  
  1842.  time 
  1843.       A time, provided in the internal representation (as generated by 
  1844.       zdtNewTime()). 
  1845.  
  1846.  result 
  1847.       None. 
  1848.  
  1849.  Notes 
  1850.  
  1851.  This function is useless, at the moment. It is reserved for future usage as 
  1852.  time destructor. You may ignore it. 
  1853.  
  1854.  Known bugs 
  1855.  
  1856.  None. 
  1857.  
  1858.  
  1859. ΓòÉΓòÉΓòÉ 5.1.21. zdtFormatDate ΓòÉΓòÉΓòÉ
  1860.  
  1861. Return a pointer to a string with the date formatted as described by the format 
  1862. field. 
  1863.  
  1864. Prototype 
  1865.  
  1866.  PSZ EXPENTRY zdtFormatDate
  1867.  (
  1868.   zdtDATE  date  ,
  1869.   PSZ    stamp  ,
  1870.   CHAR   sep   ,
  1871.   PSZ    format ,
  1872.   ...
  1873.  )
  1874.  
  1875. Parameters 
  1876.  
  1877.  date 
  1878.       A date, provided in the internal representation (as generated by 
  1879.       zdtNewDate()). 
  1880.  
  1881.  stamp 
  1882.       The pointer to the string to be filled by the function. 
  1883.  
  1884.  sep 
  1885.       The character to be used to separate the three components of the date 
  1886.       string, if any, or zdtNOSEPARATOR  if none. 
  1887.  
  1888.  format 
  1889.       A string template that describes how the date should be formatted. See 
  1890.       Specification format for a description of template layouts. 
  1891.  
  1892.  ┬╖┬╖┬╖ 
  1893.       Other parameters that match the sprintf-like escape sequences. 
  1894.  
  1895.  result 
  1896.       The pointer to a string containing the formatted date, or zdtNOTFORMATTED 
  1897.       if the date is incorrect. Note that in the latter case the returned value 
  1898.       is different from that of stamp. 
  1899.  
  1900.  Notes 
  1901.  
  1902.  The template used for this function is an extension of that used by sprintf(), 
  1903.  sscanf() and other similar C functions. In fact you may use the same syntax 
  1904.  and the same format specifications used by such functions, providing the same 
  1905.  argument list you would provide in those cases.  Refer to Specification format 
  1906.  for a description of template layouts. 
  1907.  
  1908.  Note that this function cannot perform any check on the size of the target 
  1909.  string. It is caller's responsibility to guarantee a string length large 
  1910.  enough to contain the formatted date. 
  1911.  
  1912.  Known bugs 
  1913.  
  1914.  None. 
  1915.  
  1916.  
  1917. ΓòÉΓòÉΓòÉ 5.1.22. zdtFormatTime ΓòÉΓòÉΓòÉ
  1918.  
  1919. Return a pointer to a string with the time formatted as described by the format 
  1920. field. 
  1921.  
  1922. Prototype 
  1923.  
  1924.  PSZ EXPENTRY zdtFormatTime
  1925.  (
  1926.   zdtTIME  time  ,
  1927.   PSZ    stamp  ,
  1928.   CHAR   sep   ,
  1929.   PSZ    format ,
  1930.   ...
  1931.  )
  1932.  
  1933. Parameters 
  1934.  
  1935.  time 
  1936.       A time, provided in the internal representation (as generated by 
  1937.       zdtNewTime()). 
  1938.  
  1939.  stamp 
  1940.       The pointer to the string to be filled by the function. 
  1941.  
  1942.  sep 
  1943.       The character to be used to separate the three components of the time 
  1944.       string, if any, or zdtNOSEPARATOR if none. 
  1945.  
  1946.  format 
  1947.       A string template that describes how the time should be formatted. See 
  1948.       Specification format for a description of template layouts. 
  1949.  
  1950.  ┬╖┬╖┬╖ 
  1951.       Other parameters that match the sprintf-like escape sequences. 
  1952.  
  1953.  result 
  1954.       The pointer to a string containing the formatted time, or zdtNOTFORMATTED 
  1955.       if the time is incorrect. Note that in the latter case the returned value 
  1956.       is different from that of stamp. 
  1957.  
  1958.  Notes 
  1959.  
  1960.  The template used for this function is an extension of that used by sprintf(), 
  1961.  sscanf() and other similar C functions. In fact you may use the same syntax 
  1962.  and the same format specifications used by such functions, providing the same 
  1963.  argument list you would provide in those cases.  Refer to Specification format 
  1964.  for a description of template layouts. 
  1965.  
  1966.  Note that this function cannot perform any check on the size of the target 
  1967.  string. It is caller's responsibility to guarantee a string length large 
  1968.  enough to contain the formatted time. 
  1969.  
  1970.  Known bugs 
  1971.  
  1972.  None. 
  1973.  
  1974.  
  1975. ΓòÉΓòÉΓòÉ 5.1.23. zdtGetLangId ΓòÉΓòÉΓòÉ
  1976.  
  1977. Return the language identifier corresponding to the provided language (see NLS 
  1978. considerations). 
  1979.  
  1980. Prototype 
  1981.  
  1982.  PSZ EXPENTRY zdtGetLangId
  1983.  (
  1984.   zdtLANGUAGE  lang
  1985.  )
  1986.  
  1987. Parameters 
  1988.  
  1989.  lang 
  1990.       Language whose identifier is requested. See NLS considerations for a list 
  1991.       of language identifiers, or zdtLANGUAGE. 
  1992.  
  1993.  result 
  1994.       The corresponding language identifier, or zdtNOID if the language is not 
  1995.       supported. 
  1996.  
  1997.  Notes 
  1998.  
  1999.  None. 
  2000.  
  2001.  Known bugs 
  2002.  
  2003.  None. 
  2004.  
  2005.  
  2006. ΓòÉΓòÉΓòÉ 5.1.24. zdtHours ΓòÉΓòÉΓòÉ
  2007.  
  2008. Return the first piece of the specified time, corresponding to the hours. 
  2009.  
  2010. Prototype 
  2011.  
  2012.  zdtHOURS EXPENTRY zdtHours
  2013.  (
  2014.   zdtTIME  time
  2015.  )
  2016.  
  2017. Parameters 
  2018.  
  2019.  time 
  2020.       A time, provided in the internal representation (as generated by 
  2021.       zdtNewTime()). 
  2022.  
  2023.  result 
  2024.       The hours of the specified time (provided in the internal format), or 
  2025.       zdtINVALID if the time is incorrect. This is a number between 0 included 
  2026.       and 24 excluded (24h format). See also Valid ranges. 
  2027.  
  2028.  Notes 
  2029.  
  2030.  None. 
  2031.  
  2032.  Known bugs 
  2033.  
  2034.  None. 
  2035.  
  2036.  
  2037. ΓòÉΓòÉΓòÉ 5.1.25. zdtIsLeapYear ΓòÉΓòÉΓòÉ
  2038.  
  2039. Check if year is leap. 
  2040.  
  2041. Prototype 
  2042.  
  2043.  BOOL EXPENTRY zdtIsLeapYear
  2044.  (
  2045.   zdtYEAR   year
  2046.  )
  2047.  
  2048. Parameters 
  2049.  
  2050.  year 
  2051.       Any date year. 
  2052.  
  2053.  result 
  2054.       TRUE if the input year is leap, FALSE otherwise 
  2055.  
  2056.  Notes 
  2057.  
  2058.  This function work for any year. It has not to be a number between 
  2059.  zdtBASEYEARt (included) and zdtLASTYEAR (excluded). Anyway be aware that such 
  2060.  a restriction applies to most of the FMZDTFUN.DLL functions that accept years 
  2061.  as input. See also Valid ranges. 
  2062.  
  2063.  Known bugs 
  2064.  
  2065.  None. 
  2066.  
  2067.  
  2068. ΓòÉΓòÉΓòÉ 5.1.26. zdtIsValidDate ΓòÉΓòÉΓòÉ
  2069.  
  2070. Check if a date, provided as year, month, day, is valid. 
  2071.  
  2072. Prototype 
  2073.  
  2074.  BOOL EXPENTRY zdtIsValidDate
  2075.  (
  2076.   zdtYEAR  year  ,
  2077.   zdtMONTH month ,
  2078.   zdtDAY  day
  2079.  )
  2080.  
  2081. Parameters 
  2082.  
  2083.  year 
  2084.       Date year. It must be a number between zdtBASEYEAR (included) and 
  2085.       zdtLASTYEAR (excluded). See also Valid ranges. 
  2086.  
  2087.  month 
  2088.       Date month. It must be a number between JANUARY and DECEMBER included. 
  2089.       See also Valid ranges. 
  2090.  
  2091.  day 
  2092.       Date day of month. It must be a number between 1 and 28, 29, 30 or 31, 
  2093.       depending on month and year (if leap). See also Valid ranges. 
  2094.  
  2095.  result 
  2096.       TRUE if the input values correspond to a valid date, FALSE otherwise. 
  2097.  
  2098.  Notes 
  2099.  
  2100.  None. 
  2101.  
  2102.  Known bugs 
  2103.  
  2104.  None. 
  2105.  
  2106.  
  2107. ΓòÉΓòÉΓòÉ 5.1.27. zdtIsValidTime ΓòÉΓòÉΓòÉ
  2108.  
  2109. Check if a time, provided as hours, minutes and seconds, is valid. 
  2110.  
  2111. Prototype 
  2112.  
  2113.  BOOL EXPENTRY zdtIsValidTime
  2114.  (
  2115.   zdtHOURS   hours  ,
  2116.   zdtMINUTES  minutes ,
  2117.   zdtSECONDS  seconds
  2118.  )
  2119.  
  2120. Parameters 
  2121.  
  2122.  hours 
  2123.       Time hours. It must be a number between 0 (included) and 24 (excluded). 
  2124.       See also Valid ranges. 
  2125.  
  2126.  minutes 
  2127.       Time minutes. It must be a number between 0 and 59 included. See also 
  2128.       Valid ranges. 
  2129.  
  2130.  seconds 
  2131.       Time seconds. It must be a number between 0 and 59 included. Leap seconds 
  2132.       are not supported at the moment. See also Valid ranges. 
  2133.  
  2134.  result 
  2135.       TRUE if the input values correspond to a valid time, FALSE otherwise. 
  2136.  
  2137.  Notes 
  2138.  
  2139.  None. 
  2140.  
  2141.  Known bugs 
  2142.  
  2143.  UCT leap seconds are not supported. 
  2144.  
  2145.  
  2146. ΓòÉΓòÉΓòÉ 5.1.28. zdtIsValidZone ΓòÉΓòÉΓòÉ
  2147.  
  2148. Check if a time zone, in minutes, is valid. 
  2149.  
  2150. Prototype 
  2151.  
  2152.  BOOL EXPENTRY zdtIsValidZone
  2153.  (
  2154.   zdtZONE  zone
  2155.  )
  2156.  
  2157. Parameters 
  2158.  
  2159.  zone 
  2160.       Time zone. It must be a number between zdtWESTLIMIT and zdtEASTLIMIT 
  2161.       included. See also Valid ranges. 
  2162.  
  2163.  result 
  2164.       TRUE if the input value correspond to a valid zone, FALSE otherwise. 
  2165.  
  2166.  Notes 
  2167.  
  2168.  Time zones must be provided in minutes, because there are countries that have 
  2169.  the official hour that differs from the Greenwich hour for hour fractions. 
  2170.  
  2171.  Known bugs 
  2172.  
  2173.  None. 
  2174.  
  2175.  
  2176. ΓòÉΓòÉΓòÉ 5.1.29. zdtLanguage ΓòÉΓòÉΓòÉ
  2177.  
  2178. Return the language corresponding to the provided language identifier (see NLS 
  2179. considerations). 
  2180.  
  2181. Prototype 
  2182.  
  2183.  zdtLANGUAGE EXPENTRY zdtLanguage
  2184.  (
  2185.   PSZ  langid
  2186.  )
  2187.  
  2188. Parameters 
  2189.  
  2190.  langid 
  2191.       Language identifier whose corresponding language is requested. See NLS 
  2192.       considerations for a list of language identifiers, or zdtLANGUAGE. 
  2193.  
  2194.  result 
  2195.       The language corresponding to that identifier, or zdtINVALID if that 
  2196.       language identifier is invalid, not supported, or unknown. 
  2197.  
  2198.  Notes 
  2199.  
  2200.  None. 
  2201.  
  2202.  Known bugs 
  2203.  
  2204.  None. 
  2205.  
  2206.  
  2207. ΓòÉΓòÉΓòÉ 5.1.30. zdtLocalZone ΓòÉΓòÉΓòÉ
  2208.  
  2209. Return the time zone of the workstation where the function is executed. 
  2210.  
  2211. Prototype 
  2212.  
  2213.  zdtZONE EXPENTRY zdtLocalZone
  2214.  (
  2215.   VOID
  2216.  )
  2217.  
  2218. Parameters 
  2219.  
  2220.  (void) 
  2221.       No arguments are needed. 
  2222.  
  2223.  result 
  2224.       The local time zone corresponding to current system date and time, in 
  2225.       minutes. If the local time zone cannot be computed, this function returns 
  2226.       zdtINVALID. 
  2227.  
  2228.  Notes 
  2229.  
  2230.  Time zone is returned in minutes, because there are countries that have the 
  2231.  official hour that differs from the Greenwich hour for hour fractions. 
  2232.  
  2233.  Known bugs 
  2234.  
  2235.  None. 
  2236.  
  2237.  
  2238. ΓòÉΓòÉΓòÉ 5.1.31. zdtMinutes ΓòÉΓòÉΓòÉ
  2239.  
  2240. Return the second piece of the specified time, corresponding to the minutes. 
  2241.  
  2242. Prototype 
  2243.  
  2244.  zdtMINUTES EXPENTRY zdtMinutes
  2245.  (
  2246.   zdtTIME  time
  2247.  )
  2248.  
  2249. Parameters 
  2250.  
  2251.  time 
  2252.       A time, provided in the internal representation (as generated by 
  2253.       zdtNewTime()). 
  2254.  
  2255.  result 
  2256.       The minutes of the specified time (provided in the internal format), or 
  2257.       zdtINVALID  if the time is incorrect. This is a number between 0 included 
  2258.       and 60 excluded. See also Valid ranges. 
  2259.  
  2260.  Notes 
  2261.  
  2262.  None. 
  2263.  
  2264.  Known bugs 
  2265.  
  2266.  None. 
  2267.  
  2268.  
  2269. ΓòÉΓòÉΓòÉ 5.1.32. .zdtMinutesInTime ΓòÉΓòÉΓòÉ
  2270.  
  2271. Return the total number of minutes in time. 
  2272.  
  2273. Prototype 
  2274.  
  2275.  zdtMINUTES EXPENTRY zdtMinutesInTime
  2276.  (
  2277.   zdtTIME  time
  2278.  )
  2279.  
  2280. Parameters 
  2281.  
  2282.  time 
  2283.       A time, provided in the internal representation (as generated by 
  2284.       zdtNewTime()). 
  2285.  
  2286.  result 
  2287.       The number of minutes in time. 
  2288.  
  2289.  Notes 
  2290.  
  2291.  Differently from zdtMinutes(), this function does not return the number of 
  2292.  minutes representing the second piece of a time value, but the total number of 
  2293.  minutes since midnight for that time. For example: 
  2294.  
  2295.     min = zdtMinutes(zdtNewTime(3,20,15)) ;    // min = 20
  2296.  
  2297.    tot = zdtMinutesInTime(zdtNewTime(3,20,15)) ; // tot = 200
  2298.  
  2299.  Known bugs 
  2300.  
  2301.  None. 
  2302.  
  2303.  
  2304. ΓòÉΓòÉΓòÉ 5.1.33. zdtMonth ΓòÉΓòÉΓòÉ
  2305.  
  2306. Return the month of the date. 
  2307.  
  2308. Prototype 
  2309.  
  2310.  zdtMONTH EXPENTRY zdtMonth
  2311.  (
  2312.   zdtDATE  date
  2313.  )
  2314.  
  2315. Parameters 
  2316.  
  2317.  date 
  2318.       A date, provided in the internal representation (as generated by 
  2319.       zdtNewDate()). 
  2320.  
  2321.  result 
  2322.       The month of the specified date (provided in the internal format), or 
  2323.       zdtINVALID if the date is incorrect. The month is a number between 
  2324.       JANUARY and DECEMBER included. See also Valid ranges. 
  2325.  
  2326.  Notes 
  2327.  
  2328.  None. 
  2329.  
  2330.  Known bugs 
  2331.  
  2332.  None. 
  2333.  
  2334.  
  2335. ΓòÉΓòÉΓòÉ 5.1.34. .zdtMonthAsString ΓòÉΓòÉΓòÉ
  2336.  
  2337. Return a pointer to a string with the date's month's name in it. 
  2338.  
  2339. Prototype 
  2340.  
  2341.  PSZ EXPENTRY zdtMonthAsString
  2342.  (
  2343.   zdtMONTH  month ,
  2344.   PSZ    name
  2345.  )
  2346.  
  2347. Parameters 
  2348.  
  2349.  month 
  2350.       Date month. It must be a number between JANUARY and DECEMBER included. 
  2351.       See also Valid ranges. 
  2352.  
  2353.  name 
  2354.       The pointer to the string to be filled by the function. 
  2355.  
  2356.  result 
  2357.       The pointer to the string containing the month's name, or zdtNOTAVAILABLE 
  2358.       if the date is incorrect. 
  2359.  
  2360.  Notes 
  2361.  
  2362.  This function is NLS enabled. See NLS considerations for details. 
  2363.  
  2364.  Note that this function cannot perform any check on the size of the target 
  2365.  string. It is caller's responsibility to guarantee a string length large 
  2366.  enough to contain the month name. Don't forget that such length depends on the 
  2367.  selected current language too. 
  2368.  
  2369.  Known bugs 
  2370.  
  2371.  None. 
  2372.  
  2373.  
  2374. ΓòÉΓòÉΓòÉ 5.1.35. .zdtMonthName ΓòÉΓòÉΓòÉ
  2375.  
  2376. Return a pointer to a string with the date's month's name in it. 
  2377.  
  2378. Prototype 
  2379.  
  2380.  PSZ EXPENTRY zdtMonthName
  2381.  (
  2382.   zdtDATE  date ,
  2383.   PSZ    name
  2384.  )
  2385.  
  2386. Parameters 
  2387.  
  2388.  date 
  2389.       A date, provided in the internal representation (as generated by 
  2390.       zdtNewDate()). 
  2391.  
  2392.  name 
  2393.       The pointer to the string to be filled by the function. 
  2394.  
  2395.  result 
  2396.       The pointer to the string containing the month's name, or zdtNOTAVAILABLE 
  2397.       if the date is incorrect. 
  2398.  
  2399.  Notes 
  2400.  
  2401.  This function is NLS enabled. See NLS considerations for details. 
  2402.  
  2403.  Note that this function cannot perform any check on the size of the target 
  2404.  string. It is caller's responsibility to guarantee a string length large 
  2405.  enough to contain the month name. Don't forget that such length depends on the 
  2406.  selected current language too. 
  2407.  
  2408.  Known bugs 
  2409.  
  2410.  None. 
  2411.  
  2412.  
  2413. ΓòÉΓòÉΓòÉ 5.1.36. zdtNewDate ΓòÉΓòÉΓòÉ
  2414.  
  2415. Generates an internal representation of the specified date, provided as year, 
  2416. month, day. 
  2417.  
  2418. Prototype 
  2419.  
  2420.  zdtDATE EXPENTRY zdtNewDate
  2421.  (
  2422.   zdtYEAR  year  ,
  2423.   zdtMONTH month ,
  2424.   zdtDAY  day
  2425.  )
  2426.  
  2427. Parameters 
  2428.  
  2429.  year 
  2430.       Date year. It must be a number between zdtBASEYEAR (included) and 
  2431.       zdtLASTYEAR (excluded). See also Valid ranges. 
  2432.  
  2433.  month 
  2434.       Date month. It must be a number between JANUARY and DECEMBER included. 
  2435.       See also Valid ranges. 
  2436.  
  2437.  day 
  2438.       Date day of month. It must be a number between 1 and 28, 29, 30 or 31, 
  2439.       depending on month and year (if leap). See also Valid ranges. 
  2440.  
  2441.  result 
  2442.       The internal representation of the specified date, or zdtINVALID if date 
  2443.       is invalid. 
  2444.  
  2445.  Notes 
  2446.  
  2447.  None. 
  2448.  
  2449.  Known bugs 
  2450.  
  2451.  None. 
  2452.  
  2453.  
  2454. ΓòÉΓòÉΓòÉ 5.1.37. zdtNewTime ΓòÉΓòÉΓòÉ
  2455.  
  2456. Generates an internal representation of the specified time, provided as hours, 
  2457. minutes, seconds (24h format). 
  2458.  
  2459. Prototype 
  2460.  
  2461.  zdtTIME EXPENTRY zdtNewTime
  2462.  (
  2463.   zdtHOURS   hours  ,
  2464.   zdtMINUTES  minutes ,
  2465.   zdtSECONDS  seconds
  2466.  )
  2467.  
  2468. Parameters 
  2469.  
  2470.  hours 
  2471.       Time hours. It must be a number between 0 (included) and 24 (excluded). 
  2472.       See also Valid ranges. 
  2473.  
  2474.  minutes 
  2475.       Time minutes. It must be a number between 0 and 59 included. See also 
  2476.       Valid ranges. 
  2477.  
  2478.  seconds 
  2479.       Time seconds. It must be a number between 0 and 59 included. Leap seconds 
  2480.       are not supported at the moment. See also Valid ranges. 
  2481.  
  2482.  result 
  2483.       The internal representation of the specified time, or zdtINVALID if time 
  2484.       is invalid. 
  2485.  
  2486.  Notes 
  2487.  
  2488.  None. 
  2489.  
  2490.  Known bugs 
  2491.  
  2492.  UCT leap seconds are not supported. 
  2493.  
  2494.  
  2495. ΓòÉΓòÉΓòÉ 5.1.38. zdtNow ΓòÉΓòÉΓòÉ
  2496.  
  2497. Return the internal representation of today's local time. 
  2498.  
  2499. Prototype 
  2500.  
  2501.  zdtTIME EXPENTRY zdtNow
  2502.  (
  2503.   VOID
  2504.  )
  2505.  
  2506. Parameters 
  2507.  
  2508.  (void) 
  2509.       No arguments are needed. 
  2510.  
  2511.  result 
  2512.       The local time corresponding to current system time, provided in the 
  2513.       internal representation (as generated by zdtNewTime()). If local time 
  2514.       cannot be retrieved, this function returns zdtINVALID. 
  2515.  
  2516.  Notes 
  2517.  
  2518.  This function assumes that the time retrieved from the system clock is in the 
  2519.  supported range. No validation is performed. 
  2520.  
  2521.  Known bugs 
  2522.  
  2523.  None. 
  2524.  
  2525.  
  2526. ΓòÉΓòÉΓòÉ 5.1.39. zdtSeconds ΓòÉΓòÉΓòÉ
  2527.  
  2528. Return the third piece of the specified time, corresponding to the seconds. 
  2529.  
  2530. Prototype 
  2531.  
  2532.  zdtSECONDS EXPENTRY zdtSeconds
  2533.  (
  2534.   zdtTIME  time
  2535.  )
  2536.  
  2537. Parameters 
  2538.  
  2539.  time 
  2540.       A time, provided in the internal representation (as generated by 
  2541.       zdtNewTime()). 
  2542.  
  2543.  result 
  2544.       The seconds of the specified time (provided in the internal format), or 
  2545.       zdtINVALID if the time is incorrect. This is a number between 0 included 
  2546.       and 60 excluded. See also Valid ranges. 
  2547.  
  2548.  Notes 
  2549.  
  2550.  None. 
  2551.  
  2552.  Known bugs 
  2553.  
  2554.  UCT leap seconds are not supported. 
  2555.  
  2556.  
  2557. ΓòÉΓòÉΓòÉ 5.1.40. zdtSecondsBetween ΓòÉΓòÉΓòÉ
  2558.  
  2559. Return the number of seconds between two dates. 
  2560.  
  2561. Prototype 
  2562.  
  2563.  zdtSECONDS EXPENTRY zdtSecondsBetween
  2564.  (
  2565.   zdtTIME  time1 ,
  2566.   zdtTIME  time2
  2567.  )
  2568.  
  2569. Parameters 
  2570.  
  2571.  time1 
  2572.       A earlier time, provided in the internal representation (as generated by 
  2573.       zdtNewTime()). 
  2574.  
  2575.  time2 
  2576.       A older time, provided in the internal representation (as generated by 
  2577.       zdtNewTime()). 
  2578.  
  2579.  result 
  2580.       The number of seconds between the two times. 
  2581.  
  2582.  Notes 
  2583.  
  2584.  No check is done if time1 > time2. Then the result might be a negative number 
  2585.  too. 
  2586.  
  2587.  Known bugs 
  2588.  
  2589.  None. 
  2590.  
  2591.  
  2592. ΓòÉΓòÉΓòÉ 5.1.41. zdtSecondsInTime ΓòÉΓòÉΓòÉ
  2593.  
  2594. Return the total number of seconds in time. 
  2595.  
  2596. Prototype 
  2597.  
  2598.  zdtSECONDS EXPENTRY zdtSecondsInTime
  2599.  (
  2600.   zdtTIME  time
  2601.  )
  2602.  
  2603. Parameters 
  2604.  
  2605.  time 
  2606.       A time, provided in the internal representation (as generated by 
  2607.       zdtNewTime()). 
  2608.  
  2609.  result 
  2610.       The number of seconds in time. 
  2611.  
  2612.  Notes 
  2613.  
  2614.  Differently from zdtSeconds(), this function does not return the number of 
  2615.  seconds representing the third piece of a time value, but the total number of 
  2616.  seconds since midnight for that time. For example: 
  2617.  
  2618.    sec = zdtSeconds(zdtNewTime(3,20,15)) ;    // sec = 15
  2619.  
  2620.    tot = zdtSecondsInTime(zdtNewTime(3,20,15)) ; // tot = 12015
  2621.  
  2622.  Known bugs 
  2623.  
  2624.  None. 
  2625.  
  2626.  
  2627. ΓòÉΓòÉΓòÉ 5.1.42. zdtSetLanguage ΓòÉΓòÉΓòÉ
  2628.  
  2629. Set the language to be used for weekdays' and months' names (see NLS 
  2630. considerations). 
  2631.  
  2632. Prototype 
  2633.  
  2634.  PSZ EXPENTRY zdtSetLanguage
  2635.  (
  2636.   zdtLANGUAGE  lang
  2637.  )
  2638.  
  2639. Parameters 
  2640.  
  2641.  lang 
  2642.       Language to be used. See NLS considerations for a list of language 
  2643.       identifiers, or zdtLANGUAGE. 
  2644.  
  2645.  result 
  2646.       The filename of the DLL which contains the requested resources in the 
  2647.       specified language. 
  2648.  
  2649.  Notes 
  2650.  
  2651.  See How to add another language to know how to add a new language to those 
  2652.  current supported by FMZDTFUN.DLL. 
  2653.  
  2654.  Known bugs 
  2655.  
  2656.  None. 
  2657.  
  2658.  
  2659. ΓòÉΓòÉΓòÉ 5.1.43. zdtStringAsDate ΓòÉΓòÉΓòÉ
  2660.  
  2661. Convert a date contained in a string in the sorted format to the internal 
  2662. representation. See Definitions and formats for details about date formats. 
  2663.  
  2664. Prototype 
  2665.  
  2666.  zdtDATE EXPENTRY zdtStringAsDate
  2667.  (
  2668.   PSZ   string
  2669.  )
  2670.  
  2671. Parameters 
  2672.  
  2673.  string 
  2674.       Pointer to a string containing the date in the sorted format (ie. 
  2675.       yyyymmd). 
  2676.  
  2677.  result 
  2678.       A date, provided in the internal representation (as generated by 
  2679.       zdtNewDate()), or zdtINVALID if the string does not contain a valid date. 
  2680.  
  2681.  Notes 
  2682.  
  2683.  Valid ranges describes which is the valid range for dates for FMZDTFUNC.DLL 
  2684.  functions. 
  2685.  
  2686.  Known bugs 
  2687.  
  2688.  None. 
  2689.  
  2690.  
  2691. ΓòÉΓòÉΓòÉ 5.1.44. zdtStringAsTime ΓòÉΓòÉΓòÉ
  2692.  
  2693. Convert a time contained in a string in the sorted format to the internal 
  2694. representation. See Definitions and formats for details about time formats. 
  2695.  
  2696. Prototype 
  2697.  
  2698.  zdtTIME EXPENTRY zdtStringAsTime
  2699.  (
  2700.   PSZ   string
  2701.  )
  2702.  
  2703. Parameters 
  2704.  
  2705.  string 
  2706.       Pointer to a string containing the date in the sorted format (ie. 
  2707.       hhmmss). 
  2708.  
  2709.  result 
  2710.       A time, provided in the internal representation (as generated by 
  2711.       zdtNewTime()), or zdtINVALID if the string does not contain a valid time. 
  2712.  
  2713.  Notes 
  2714.  
  2715.  Valid ranges describes which is the valid range for times for FMZDTFUN.DLL 
  2716.  functions. 
  2717.  
  2718.  Known bugs 
  2719.  
  2720.  None. 
  2721.  
  2722.  
  2723. ΓòÉΓòÉΓòÉ 5.1.45. zdtStringIsDate ΓòÉΓòÉΓòÉ
  2724.  
  2725. Check if a date contained in a string in the sorted format belongs to the valid 
  2726. range for FMZDTFUN.DLL functions. See Definitions and formats for details about 
  2727. date formats. 
  2728.  
  2729. Prototype 
  2730.  
  2731.  BOOL EXPENTRY zdtStringIsDate
  2732.  (
  2733.   PSZ   string
  2734.  )
  2735.  
  2736. Parameters 
  2737.  
  2738.  string 
  2739.       Pointer to a string containing the date in the sorted format (ie. 
  2740.       yyyymmdd). 
  2741.  
  2742.  result 
  2743.       TRUE if the input string represents a valid date for FMZDTFUN.DLL 
  2744.       functions, FALSE otherwise. 
  2745.  
  2746.  Notes 
  2747.  
  2748.  Valid ranges describes which is the valid range for dates for FMZDTFUN.DLL 
  2749.  functions. 
  2750.  
  2751.  Known bugs 
  2752.  
  2753.  None. 
  2754.  
  2755.  
  2756. ΓòÉΓòÉΓòÉ 5.1.46. zdtStringIsTime ΓòÉΓòÉΓòÉ
  2757.  
  2758. Check if a time contained in a string in the sorted format belongs to the valid 
  2759. range for FMZDTFUN.DLL functions. See Definitions and formats for details about 
  2760. time formats. 
  2761.  
  2762. Prototype 
  2763.  
  2764.  BOOL EXPENTRY zdtStringIsTime
  2765.  (
  2766.   PSZ   string
  2767.  )
  2768.  
  2769. Parameters 
  2770.  
  2771.  string 
  2772.       Pointer to a string containing the time in the sorted format (ie. 
  2773.       hhmmss). 
  2774.  
  2775.  result 
  2776.       TRUE if the input string represents a valid time for FMZDTFUN.DLL 
  2777.       functions, FALSE otherwise. 
  2778.  
  2779.  Notes 
  2780.  
  2781.  Valid ranges describes which is the valid range for times for FMZDTFUN.DLL 
  2782.  functions. 
  2783.  
  2784.  Known bugs 
  2785.  
  2786.  None. 
  2787.  
  2788.  
  2789. ΓòÉΓòÉΓòÉ 5.1.47. zdtTimeAsString ΓòÉΓòÉΓòÉ
  2790.  
  2791. Return a pointer to a string with the time in the sorted format, that is 
  2792. hhmmss. See Definitions and formats for details about time formats. 
  2793.  
  2794. Prototype 
  2795.  
  2796.  PSZ EXPENTRY zdtTimeAsString
  2797.  (
  2798.   zdtTIME  time  ,
  2799.   PSZ    sorted
  2800.  )
  2801.  
  2802. Parameters 
  2803.  
  2804.  time 
  2805.       A time, provided in the internal representation (as generated by 
  2806.       zdtNewTime()). 
  2807.  
  2808.  sorted 
  2809.       The pointer to the string to be filled by the function. It should be 7 
  2810.       bytes long, at least. 
  2811.  
  2812.  result 
  2813.       The pointer to a string containing the sorted format of the time, or 
  2814.       zdtNOTFORMATTED if time is not valid. 
  2815.  
  2816.  Notes 
  2817.  
  2818.  This function is NLS enabled since it doesn't contain any time separator. 
  2819.  
  2820.  Note that this function cannot perform any check on the size of the target 
  2821.  string. It is caller's responsibility to guarantee a string length large 
  2822.  enough to contain the formatted time. 
  2823.  
  2824.  Known bugs 
  2825.  
  2826.  None. 
  2827.  
  2828.  
  2829. ΓòÉΓòÉΓòÉ 5.1.48. zdtToday ΓòÉΓòÉΓòÉ
  2830.  
  2831. Return the internal representation of today's local date. 
  2832.  
  2833. Prototype 
  2834.  
  2835.  zdtDATE EXPENTRY zdtToday
  2836.  (
  2837.   VOID
  2838.  )
  2839.  
  2840. Parameters 
  2841.  
  2842.  (void) 
  2843.       No arguments are needed. 
  2844.  
  2845.  result 
  2846.       The local date corresponding to current system date, provided in the 
  2847.       internal representation (as generated by zdtNewDate()). If local date 
  2848.       cannot be retrieved, this function returns zdtINVALID. 
  2849.  
  2850.  Notes 
  2851.  
  2852.  This function assumes that the date retrieved from the system clock is in the 
  2853.  supported range. No validation is performed. 
  2854.  
  2855.  Known bugs 
  2856.  
  2857.  None. 
  2858.  
  2859.  
  2860. ΓòÉΓòÉΓòÉ 5.1.49. zdtUtcNow ΓòÉΓòÉΓòÉ
  2861.  
  2862. Return the internal representation of today's UTC time. 
  2863.  
  2864. Prototype 
  2865.  
  2866.  zdtTIME EXPENTRY zdtUtcNow
  2867.  (
  2868.   VOID
  2869.  )
  2870.  
  2871. Parameters 
  2872.  
  2873.  (void) 
  2874.       No arguments are needed. 
  2875.  
  2876.  result 
  2877.       The UTC time corresponding to current system time, provided in the 
  2878.       internal representation (as generated by zdtNewTime()). If UTC time 
  2879.       cannot be retrieved, this function returns zdtINVALID. 
  2880.  
  2881.  Notes 
  2882.  
  2883.  UTC stands for Coordinated Universal Time. 
  2884.  
  2885.  This function assumes that the time retrieved from the system clock is in the 
  2886.  supported range. No validation is performed. 
  2887.  
  2888.  Known bugs 
  2889.  
  2890.  None. 
  2891.  
  2892.  
  2893. ΓòÉΓòÉΓòÉ 5.1.50. zdtUtcToday ΓòÉΓòÉΓòÉ
  2894.  
  2895. Return the internal representation of today's UTC date. 
  2896.  
  2897. Prototype 
  2898.  
  2899.  zdtDATE EXPENTRY zdtUtcToday
  2900.  (
  2901.   VOID
  2902.  )
  2903.  
  2904. Parameters 
  2905.  
  2906.  (void) 
  2907.       No arguments are needed. 
  2908.  
  2909.  result 
  2910.       The UTC date corresponding to current system date, provided in the 
  2911.       internal representation (as generated by zdtNewDate()). If UTC date 
  2912.       cannot be retrieved, this function returns zdtINVALID. 
  2913.  
  2914.  Notes 
  2915.  
  2916.  UTC stands for Coordinated Universal Time. 
  2917.  
  2918.  This function assumes that the date retrieved from the system clock is in the 
  2919.  supported range. No validation is performed. 
  2920.  
  2921.  Known bugs 
  2922.  
  2923.  None. 
  2924.  
  2925.  
  2926. ΓòÉΓòÉΓòÉ 5.1.51. zdtWeekday ΓòÉΓòÉΓòÉ
  2927.  
  2928. Return the weekday number (international standard). 
  2929.  
  2930. Prototype 
  2931.  
  2932.  zdtWEEKDAY EXPENTRY zdtWeekday
  2933.  (
  2934.   zdtDATE  date
  2935.  )
  2936.  
  2937. Parameters 
  2938.  
  2939.  date 
  2940.       A date, provided in the internal representation (as generated by 
  2941.       zdtNewDate()). 
  2942.  
  2943.  result 
  2944.       The weekday number for the specified date (provided in the internal 
  2945.       format), or zdtINVALID if the date is incorrect. The weekday number is a 
  2946.       value between 1 (Monday) and 7 (Sunday). See also Valid ranges. 
  2947.  
  2948.  Notes 
  2949.  
  2950.  None. 
  2951.  
  2952.  Known bugs 
  2953.  
  2954.  None. 
  2955.  
  2956.  
  2957. ΓòÉΓòÉΓòÉ 5.1.52. zdtWeekdayAsString ΓòÉΓòÉΓòÉ
  2958.  
  2959. Return a pointer to a string with the date's weekday's name in it. 
  2960.  
  2961. Prototype 
  2962.  
  2963.  PSZ EXPENTRY zdtWeekdayAsString
  2964.  (
  2965.   zdtWEEKDAY  weekday ,
  2966.   PSZ     name
  2967.  )
  2968.  
  2969. Parameters 
  2970.  
  2971.  weekday 
  2972.       The weekday number must be a value between 1 (Monday) and 7 (Sunday). See 
  2973.       also Valid ranges. 
  2974.  
  2975.  name 
  2976.       The pointer to the string to be filled by the function. 
  2977.  
  2978.  result 
  2979.       The pointer to the string containing the weekday's name, or 
  2980.       zdtNOTAVAILABLE if the date is incorrect. 
  2981.  
  2982.  Notes 
  2983.  
  2984.  This function is NLS enabled. See NLS considerations for details. 
  2985.  
  2986.  Note that this function cannot perform any check on the size of the target 
  2987.  string. It is caller's responsibility to guarantee a string length large 
  2988.  enough to contain the weekday name. Don't forget that such length depends on 
  2989.  the selected current language too. 
  2990.  
  2991.  Known bugs 
  2992.  
  2993.  None. 
  2994.  
  2995.  
  2996. ΓòÉΓòÉΓòÉ 5.1.53. zdtWeekdayName ΓòÉΓòÉΓòÉ
  2997.  
  2998. Return a pointer to a string with the date's weekday's name in it. 
  2999.  
  3000. Prototype 
  3001.  
  3002.  PSZ EXPENTRY zdtWeekdayName
  3003.  (
  3004.   zdtDATE  date ,
  3005.   PSZ    name
  3006.  )
  3007.  
  3008. Parameters 
  3009.  
  3010.  date 
  3011.       A date, provided in the internal representation (as generated by 
  3012.       zdtNewDate()). 
  3013.  
  3014.  name 
  3015.       The pointer to the string to be filled by the function. 
  3016.  
  3017.  result 
  3018.       The pointer to the string containing the weekday's name, or 
  3019.       zdtNOTAVAILABLE  if the date is incorrect. 
  3020.  
  3021.  Notes 
  3022.  
  3023.  This function is NLS enabled. See NLS considerations for details. 
  3024.  
  3025.  Note that this function cannot perform any check on the size of the target 
  3026.  string. It is caller's responsibility to guarantee a string length large 
  3027.  enough to contain the weekday name. Don't forget that such length depends on 
  3028.  the selected current language too. 
  3029.  
  3030.  Known bugs 
  3031.  
  3032.  None. 
  3033.  
  3034.  
  3035. ΓòÉΓòÉΓòÉ 5.1.54. zdtWeekOfYear ΓòÉΓòÉΓòÉ
  3036.  
  3037. Return the week of the year. 
  3038.  
  3039. Prototype 
  3040.  
  3041.  zdtWEEK EXPENTRY zdtWeekOfYear
  3042.  (
  3043.   zdtDATE  date
  3044.  )
  3045.  
  3046. Parameters 
  3047.  
  3048.  date 
  3049.       A date, provided in the internal representation (as generated by 
  3050.       zdtNewDate()). 
  3051.  
  3052.  result 
  3053.       The week of the year format), or zdtINVALID  if the date is incorrect. 
  3054.       The week of the year is a value between 1 and 53. See also Valid ranges. 
  3055.  
  3056.  Notes 
  3057.  
  3058.  The week of the year depends on the convention used for the first day of the 
  3059.  week. FMZDTFUN.DLL  uses the international convention, as described in Valid 
  3060.  ranges. If you use the USA convention, just check if day is Sunday (by using 
  3061.  zdtWeekday), and in such a case decrease the week of the year by one. 
  3062.  
  3063.  Known bugs 
  3064.  
  3065.  None. 
  3066.  
  3067.  
  3068. ΓòÉΓòÉΓòÉ 5.1.55. zdtYear ΓòÉΓòÉΓòÉ
  3069.  
  3070. Return the absolute year of date. 
  3071.  
  3072. Prototype 
  3073.  
  3074.  zdtYEAR EXPENTRY zdtYear
  3075.  (
  3076.   zdtDATE  date
  3077.  )
  3078.  
  3079. Parameters 
  3080.  
  3081.  date 
  3082.       A date, provided in the internal representation (as generated by 
  3083.       zdtNewDate()). 
  3084.  
  3085.  result 
  3086.       The absolute year of the specified date (provided in the internal 
  3087.       format), or zdtINVALID if the date is incorrect. The absolute year is a 
  3088.       number between zdtBASEYEAR (included) and zdtLASTYEAR  (excluded). See 
  3089.       also Valid ranges. 
  3090.  
  3091.  Notes 
  3092.  
  3093.  None. 
  3094.  
  3095.  Known bugs 
  3096.  
  3097.  None. 
  3098.  
  3099.  
  3100. ΓòÉΓòÉΓòÉ 5.2. Macro sheets ΓòÉΓòÉΓòÉ
  3101.  
  3102. This library has no macros. 
  3103.  
  3104.  
  3105. ΓòÉΓòÉΓòÉ 5.3. Data sheets ΓòÉΓòÉΓòÉ
  3106.  
  3107. Select one: 
  3108.  
  3109. Γûá zLIBVERS
  3110. Γûá Signal handling types
  3111. Γûá zdtLANGUAGE
  3112. Γûá zdtLOCALDT
  3113. Γûá zdtMONTH
  3114. Γûá zdtWEEKDAY
  3115. Γûá FMZDTFUN.DLL types
  3116. Γûá FMZDTFUN.DLL constants
  3117. Γûá Z Family/2 general constants
  3118.  
  3119.  
  3120. ΓòÉΓòÉΓòÉ 5.3.1. zLIBVERS ΓòÉΓòÉΓòÉ
  3121.  
  3122. This structure is used by all Z Family/2 DLL's to maintain information about 
  3123. the level of the library, and the date and time of compilation of library 
  3124. source code. 
  3125.  
  3126. Structure 
  3127.  
  3128.  typedef struct zLibVersion
  3129.  {
  3130.   USHORT Version       ;
  3131.   USHORT Release       ;
  3132.   USHORT Modification    ;
  3133.   CHAR  String[zLEVELSIZE] ;
  3134.   CHAR  Stamp[zSTAMPSIZE]  ;
  3135.   CHAR  Name[zNAMESIZE]   ;
  3136.  }
  3137.  zLIBVERS, *zPLIBVERS ;
  3138.  
  3139. Fields 
  3140.  
  3141.  Version 
  3142.       Library version.  Updated only when major functional changes are applied 
  3143.       to the library code. 
  3144.  
  3145.  Release 
  3146.       Library release.  Updated only when minor functional changes are applied 
  3147.       to the library code. 
  3148.  
  3149.  Modification 
  3150.       Library modification.  Updated when fixes are applied to the library 
  3151.       code. 
  3152.  
  3153.  String 
  3154.       A string containing the library level (version plus release). It must 
  3155.       match the values of version and release. 
  3156.  
  3157.  Stamp 
  3158.       A string containing the compilation time stamp. Usually the C Set/2 
  3159.       predefined constant __TIMESTAMP__ is assigned to this field. 
  3160.  
  3161.  Name 
  3162.       A string containing the library name. If the library was cloned with a 
  3163.       different name, and zdtSetLibraryName() was previously called, this 
  3164.       string contains the name of the clone. 
  3165.  
  3166.  Include file 
  3167.  
  3168.  zgeneral.h 
  3169.  
  3170.  Notes 
  3171.  
  3172.  This structure is the same for all the Z Family/2 DLL's. 
  3173.  
  3174.  
  3175. ΓòÉΓòÉΓòÉ 5.3.2. Signal handling types ΓòÉΓòÉΓòÉ
  3176.  
  3177. Two types are used in the signal handling feature of FMZHPFUN.DLL: zSIGHAND 
  3178. and zSIGNAL. 
  3179.  
  3180. zSIGHAND is the pointer to a signal handler function that can be used as 
  3181. argument when zdtRegisterSignal() is called (see Signal handling for details 
  3182. about how to write a signal handler). 
  3183.  
  3184. zSIGNAL  is the signal event that may be returned by zdtRegisterSignal() if the 
  3185. registration of the signal handler fails. 
  3186.  
  3187. Definition 
  3188.  
  3189.  typedef int  zSIGNAL      ;
  3190.  typedef void (*zSIGHAND)(int) ;
  3191.  
  3192. Signals 
  3193.  
  3194. This is the list of the possible values whose type is zSIGNAL. 
  3195.  
  3196.  SIGILL 
  3197.       Illegal instruction (invalid function image) 
  3198.  
  3199.  SIGSEGV 
  3200.       Invalid access to memory 
  3201.  
  3202.  SIGFPE 
  3203.       Floating point exception 
  3204.  
  3205.  SIGTERM 
  3206.       OS/2 SIGTERM (killprocess) signal 
  3207.  
  3208.  SIGABRT 
  3209.       Abort() signal 
  3210.  
  3211.  SIGINT 
  3212.       OS/2 SIGINTR signal 
  3213.  
  3214.  SIGUSR1 
  3215.       User exception in range 0xA0000000-0xBFFFFFFF 
  3216.  
  3217.  SIGUSR2 
  3218.       User exception in range 0xC0000000-0xDFFFFFFF 
  3219.  
  3220.  SIGUSR3 
  3221.       User exception in range 0xE0000000-0xFFFFFFFF 
  3222.  
  3223.  SIGBREAK 
  3224.       OS/2 Ctrl-Break sequence 
  3225.  
  3226.  Include file 
  3227.  
  3228.  zgeneral.h 
  3229.  
  3230.  Notes 
  3231.  
  3232.  These types are the same for all the Z Family/2 DLL's. 
  3233.  
  3234.  
  3235. ΓòÉΓòÉΓòÉ 5.3.3. zdtLANGUAGE ΓòÉΓòÉΓòÉ
  3236.  
  3237. It's the type for the supported languages. 
  3238.  
  3239. Definition 
  3240.  
  3241.  #define  zdtDEFLANG  0  // Default value. Always first in set.
  3242.  #define  zdtITALANG  1  // Italian
  3243.  #define  zdtENGLANG  2  // English
  3244.  #define  zdtBPOLANG  3  // Brazilian Portuguese
  3245.  #define  zdtDEULANG  4  // German
  3246.  #define  zdtSVELANG  5  // Svedish
  3247.  #define  zdtESPLANG  6  // Spanish
  3248.  #define  zdtFRALANG  7  // French
  3249.  #define  zdtDUTLANG  8  // Dutch
  3250.  #define  zdtDANLANG  9  // Danish
  3251.  #define  zdtLSTLANG  10  // Special value. Always last in set.
  3252.  
  3253.  typedef  LONG  zdtLANGUAGE ;
  3254.  
  3255. Include files 
  3256.  
  3257. zdtdefs.h
  3258. zdttypes.h
  3259.  
  3260. Notes 
  3261.  
  3262. See NLS considerations for detail about the use of the described type. 
  3263.  
  3264.    Important Do not rely on the real values of the above constants, since they 
  3265.    may change in future. Use always the constant names. 
  3266.  
  3267.  
  3268. ΓòÉΓòÉΓòÉ 5.3.4. zdtLOCALDT ΓòÉΓòÉΓòÉ
  3269.  
  3270. This structure is used by zdtComputeLocalTime() for the date, time and zone 
  3271. values corresponding to a specific time zone. 
  3272.  
  3273. Structure 
  3274.  
  3275.  typedef struct
  3276.  {
  3277.   zdtDATE  date ;
  3278.   zdtTIME  time ;
  3279.   zdtZONE  zone ;
  3280.  }
  3281.  zdtLOCALDT ;
  3282.  
  3283. Fields 
  3284.  
  3285.  date 
  3286.       A date, provided in the internal representation (as generated by 
  3287.       zdtNewDate()). 
  3288.  time 
  3289.       A time, provided in the internal representation (as generated by 
  3290.       zdtNewTime()). 
  3291.  zone 
  3292.       Time zone. It must be a number between zdtWESTLIMIT and zdtESTLIMIT 
  3293.       included. See also Valid ranges. 
  3294.  
  3295.  Include file 
  3296.  
  3297.   zdttypes.h
  3298.  
  3299.  Notes 
  3300.  
  3301.  None. 
  3302.  
  3303.  
  3304. ΓòÉΓòÉΓòÉ 5.3.5. zdtMONTH ΓòÉΓòÉΓòÉ
  3305.  
  3306. It's the type for the month numbers. 
  3307.  
  3308. Definition 
  3309.  
  3310.  #define  JANUARY   1
  3311.  #define  FEBRUARY   2
  3312.  #define  MARCH    3
  3313.  #define  APRIL    4
  3314.  #define  MAY     5
  3315.  #define  JUNE     6
  3316.  #define  JULY     7
  3317.  #define  AUGUST    8
  3318.  #define  SEPTEMBER  9
  3319.  #define  OCTOBER   10
  3320.  #define  NOVEMBER  11
  3321.  #define  DECEMBER  12
  3322.  
  3323.  typedef  LONG  zdtMONTH ;
  3324.  
  3325. Include file 
  3326.  
  3327. zdtdefs.h
  3328. zdttypes.h
  3329.  
  3330. Notes 
  3331.  
  3332. See Valid ranges for detail about the use of the described type. 
  3333.  
  3334.  
  3335. ΓòÉΓòÉΓòÉ 5.3.6. zdtWEEKDAY ΓòÉΓòÉΓòÉ
  3336.  
  3337. It's the type for the weekday numbers. 
  3338.  
  3339. Definition 
  3340.  
  3341.  #define  MONDAY   1
  3342.  #define  TUESDAY   2
  3343.  #define  WEDNESDAY  3
  3344.  #define  THURSDAY  4
  3345.  #define  FRIDAY   5
  3346.  #define  SATURDAY  6
  3347.  #define  SUNDAY   7
  3348.  
  3349.  typedef  LONG  zdtWEEKDAY ;
  3350.  
  3351. Include file 
  3352.  
  3353. zdtdefs.h
  3354. zdttypes.h
  3355.  
  3356. Notes 
  3357.  
  3358. See Valid ranges for detail about the use of the described type. 
  3359.  
  3360.  
  3361. ΓòÉΓòÉΓòÉ 5.3.7. Other FMZDTFUN.DLL types ΓòÉΓòÉΓòÉ
  3362.  
  3363. Hereinafter a list of other types that could be used by the applications that 
  3364. are dynamically linked to FMZDTFUN.DLL is shown. 
  3365.  
  3366.  zdtDATE 
  3367.       A date in the FMZDTFUN.DLL representation. 
  3368.  
  3369.  zdtDAY 
  3370.       Day of month. 
  3371.  
  3372.  zdtDAYS 
  3373.       Any amount of days. 
  3374.  
  3375.  zdtHOURS 
  3376.       Hours. 
  3377.  
  3378.  zdtMINUTES 
  3379.       Minutes. 
  3380.  
  3381.  zdtSECONDS 
  3382.       Seconds. 
  3383.  
  3384.  zdtTIME 
  3385.       Time. 
  3386.  
  3387.  zdtWEEK 
  3388.       Week of year. 
  3389.  
  3390.  zdtYEAR 
  3391.       Year. 
  3392.  
  3393.  zdtZONE 
  3394.       Zone offset (in minutes). 
  3395.  
  3396.  Include file 
  3397.  
  3398.   zdttypes.h
  3399.  
  3400.  Notes 
  3401.  
  3402.  None. 
  3403.  
  3404.  
  3405. ΓòÉΓòÉΓòÉ 5.3.8. Library constants ΓòÉΓòÉΓòÉ
  3406.  
  3407. Hereinafter a list of all the constants that could be used by the applications 
  3408. that are dynamically linked to FMZLMFUN.DLL is shown. 
  3409.  
  3410.  zdtDLLNAME 
  3411.       The default name of this library. Note that, if you clone this library, 
  3412.       the real name must be changed by using the zdtSetLibraryName() function. 
  3413.       In such a case, you cannot use any more this constant. 
  3414.  
  3415.  zdtZPREFIX 
  3416.       The Z Family/2 identifier of this library. 
  3417.  
  3418.  zdtBASEYEAR 
  3419.       Lower value for year (included in range). 
  3420.  
  3421.  zdtLASTYEAR 
  3422.       Higher value for year (excluded from range). 
  3423.  
  3424.  zdtINVALID 
  3425.       It's returned by all the functions that extract information from a date. 
  3426.       It means that the date is not in the valid supported range. 
  3427.  
  3428.  zdtNOTAVAILABLE 
  3429.       It's returned by all the functions that fill a string if that string 
  3430.       cannot be loaded because the input data are not correct. 
  3431.  
  3432.  zdtNOTFORMATTED 
  3433.       It's returned by all the functions that format a string if that string 
  3434.       cannot be generated because the input data are not correct. 
  3435.  
  3436.  zdtHOURSINDAY 
  3437.       Number of hours in one day. 
  3438.  
  3439.  zdtSECONDSINDAY 
  3440.       Number of seconds in one day. 
  3441.  
  3442.  zdtSECONDSINHOUR 
  3443.       Number of seconds in one hour. 
  3444.  
  3445.  zdtSECONDSINMINUTE 
  3446.       Number of seconds in one minute. 
  3447.  
  3448.  zdtMINUTESINHOUR 
  3449.       Number of minutes in one hour. 
  3450.  
  3451.  zdtEASTLIMIT 
  3452.       East limit for timezones (in minutes). 
  3453.  
  3454.  zdtWESTLIMIT 
  3455.       West limit for timezones (in minutes). 
  3456.  
  3457.  zdtNOSEPARATOR 
  3458.       Used in zdtFormatDate() and  zdtFormatTime() when no separator should be 
  3459.       use when formatting the input data. 
  3460.  
  3461.  Include file 
  3462.  
  3463.   zdtdefs.h
  3464.  
  3465.  Notes 
  3466.  
  3467.  None. 
  3468.  
  3469.  
  3470. ΓòÉΓòÉΓòÉ 5.3.9. Z Family/2 general constants ΓòÉΓòÉΓòÉ
  3471.  
  3472. The following constants are shared by all Z Family/2 DLL's. 
  3473.  
  3474.  zPRODPREF 
  3475.       Z Family/2 three-character product prefix (ZDT). 
  3476.  
  3477.  zPRODNUMB 
  3478.       Z Family/2 product number (5641-504). 
  3479.  
  3480.  zCOPYRIGHT 
  3481.       Z Family/2 copyright statement. 
  3482.  
  3483.  zNAMESIZE 
  3484.       Maximum size of Name string in zLIBVERS. 
  3485.  
  3486.  zLEVELSIZE 
  3487.       Maximum size of Level string in zLIBVERS. 
  3488.  
  3489.  zSTAMPSIZE 
  3490.       Maximum size of Stamp string in zLIBVERS. 
  3491.  
  3492.  zNULLERRORID 
  3493.       Null error identifier. To be used when the error identifier can be 
  3494.       ignored by the called function. 
  3495.  
  3496.  zEXEMINERRID 
  3497.       Minimum value of error identifiers for user applications. 
  3498.  
  3499.  zEXEMAXERRID 
  3500.       Maximum value of error identifiers for user applications. 
  3501.  
  3502.  zDLLMINERRID 
  3503.       Minimum value of error identifiers for the Z Family/2 DLL's. 
  3504.  
  3505.  zDLLMAXERRID 
  3506.       Maximum value of error identifiers for the Z Family/2 DLL's. 
  3507.  
  3508.  zSIGNAL 
  3509.       Z Family/2 signal type for signal handling. 
  3510.  
  3511.  zSIGHAND 
  3512.       Z Family/2 signal handler type for signal handling. 
  3513.  
  3514.  zBIT 
  3515.       Z Family/2 type used for unsigned bits. 
  3516.  
  3517.  Include file 
  3518.  
  3519.  zgeneral.h 
  3520.  
  3521.  Notes 
  3522.  
  3523.  Error identifiers are used to identify both the error itself, and the message 
  3524.  associated with it. 
  3525.  
  3526.  
  3527. ΓòÉΓòÉΓòÉ 6. Sample Program ΓòÉΓòÉΓòÉ
  3528.  
  3529. Select one: 
  3530.  
  3531.  Running the sample program 
  3532.  
  3533.  Sample program tutorial 
  3534.  
  3535.  
  3536. ΓòÉΓòÉΓòÉ 6.1. Running the sample program ΓòÉΓòÉΓòÉ
  3537.  
  3538.  Important 
  3539.  
  3540.  To run the sample program, you must already have installed the library as 
  3541.  described in How to install the library. 
  3542.  
  3543.  Do not double-click on the item below unless 
  3544.  
  3545.   1. you copied the sample program to a directory listed in your PATH, or added 
  3546.      the directory where the sample program is to your PATH. 
  3547.  
  3548.   2. you copied all the needed dynamic libraries to a directory listed in your 
  3549.      LIBPATH, or added the directory where such libraries are to your LIBPATH. 
  3550.  
  3551.    Hit me to run the sample 
  3552.  
  3553.  
  3554. ΓòÉΓòÉΓòÉ 6.2. Sample program tutorial ΓòÉΓòÉΓòÉ
  3555.  
  3556. The FMZDTFUN.DLL package contains also a sample program that shows how to use 
  3557. the DLL functions. 
  3558.  
  3559. The program is called DTEINF and can be launched either from an OS/2 window (or 
  3560. full-screen), or from the OS/2 Desktop, double-clicking on its icon. 
  3561.  
  3562. When the program is executed, a small windows appear on the screen. 
  3563.  
  3564. DTEINF window has only a single pull-down menu, called Date. If you open that 
  3565. menu you can see four items: 
  3566.  
  3567.    Check.. 
  3568.         A dialog box is displayed. Its title is Check date. On the top left 
  3569.         corner there is a combo box that allows you to select the language to 
  3570.         be used for the names of weekdays and months. A list is available in 
  3571.         NLS considerations. 
  3572.  
  3573.         The box left side contains three input fields, that allow you to enter 
  3574.         the day, month and year of a date. As you press the large vertical 
  3575.         button in the middle of the box (that one marked by  arrow), the 
  3576.         program fills the output fields on the right side of the box. There are 
  3577.         five of them, which show 
  3578.  
  3579.       o the name of the weekday 
  3580.       o the name of the month 
  3581.       o the day of the year 
  3582.       o the corresponding Julian date 
  3583.       o the week of the year 
  3584.  
  3585.         Below such fields there is a check box that shows if year is leap. 
  3586.  
  3587.         You may check as many dates as you like. If a date is out of the 
  3588.         supported range (see Valid ranges) an error message is displayed. When 
  3589.         you have finished, just press OK to close the dialog box. 
  3590.  
  3591.    Timezones... 
  3592.         A dialog box is displayed. Its title is Timezones. It can be used to 
  3593.         compute the local time of a specified time zone given the UTC Time, or 
  3594.         if you like, time at Greenwich meridian (which is practically the 
  3595.         same). 
  3596.  
  3597.         Dialog consists of three segments. 
  3598.  
  3599.         The top segment contains three fields, to enter the UTC Time as hours, 
  3600.         minutes and seconds. 
  3601.  
  3602.         The central segment can be used to specify the time zone offset with 
  3603.         respect Greenwich. You may type in the offset field, placed on top of a 
  3604.         bitmap showing a world map, or use the slider below the bitmap. The two 
  3605.         controls are linked, so that a change of one updates the other. Offset 
  3606.         is given in hour, rather than minutes, as requested by 
  3607.         zdtComputeLocalTime(). 
  3608.  
  3609.         The third section is used to compute the requested local time and show 
  3610.         it. It consists of a button marked by a  arrow, and three output 
  3611.         fields. When you press the button, the resulting time is displayed in 
  3612.         the three fields as hours, minutes, and seconds (24h format). 
  3613.  
  3614.         You may check as many times as you like. If a time or the time zone 
  3615.         value are out of the supported range (see Valid ranges) an error 
  3616.         message is displayed. When you have finished, just press OK to close 
  3617.         the dialog box. 
  3618.  
  3619.    About 
  3620.         A message box containing the name of the library, its version, the 
  3621.         author and some other related information (eg. copyright) is displayed. 
  3622.         The first two fields are obtained by the zdtLibraryVersion() function. 
  3623.  
  3624.    Exit 
  3625.         The user is prompted for the confirmation of the EXIT request. 
  3626.  
  3627.         Program ends. 
  3628.