home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / MISC / FTSER10.ZIP / ADTDV2.ZIP / readme.txt < prev    next >
Text File  |  1997-01-26  |  4KB  |  93 lines

  1.  
  2. Introduction to the td.lib time/date library:
  3.  
  4. I was recently doing some research on the Civil War and needed to work
  5. with dates and times for that period. I needed to be able to quickly
  6. and accurately perform time and date calculations, view calendars, make
  7. conversions, and print that information to files in a variety of formats.
  8. Needless to say, the functions provided by ANSI were completely inadequate.
  9. No functions for dates before 1900 were provided, strftime() did not work,
  10. which meant not only could I not directly work with these dates and times,
  11. they could not even be directly formatted and printed.
  12. difftime() did'nt work either.
  13.  
  14. Another problem was with the tm structure itself; the system allocates
  15. and deallocates the memory space for the structure and simply overwrites
  16. the time/date fields when additional calls are made. Trying to work with
  17. multiple instances of the structure caused a number of system crashes.
  18. The time field of the tm structure is on a take-it-or-leave-it 24hr clock,
  19. the month field    is a counter-intuitive 0-11, and the year field is
  20. "year-1900" end of story.
  21.  
  22. Simply said, the programmer must work with the unwieldy    tm structure and
  23. its initialization, make numerous date and time conversions and then
  24. concatenate strings for formatting etc. etc. taking too much time away
  25. from the programmer.
  26.  
  27. I wanted time and date routines to be easy enough for the beginning progra
  28. mmer to quickly learn and use. The programmer should be able to simply
  29. declare a predefined time/date type, load its fields with either the
  30. current time and date settings, or any other time and date, and then 
  31. start using it.
  32.  
  33. I did'nt need to calculate moon phases, solar eclipses, cyclic multiphase
  34. harmonic patterns, or even dog years. After searching the web for quite
  35. awhile, that type of code or libraries was about all I found. 
  36. The ones that did a fairly good job were too complicated to quickly learn
  37. and use and did not comply with    the ANSI format specifiers, which is what
  38. I am used to, so I decided to roll my own.
  39.  
  40. The result is this small time/date library which will provide all of
  41. the basic functionality needed to perform from fast print-the-time-and-date
  42. statements to more complicated time/date routines. Functions are provided
  43. for practical applications that the programmer is most likely to encounter
  44. - not for rarely used moon phases and such.
  45.  
  46. The library uses the cross-over date of Oct. 1582 and calendar convention
  47. of January 1 being the beginning of the new year. The calendrical
  48. method is proleptic. Detailed discussions of Julian and Gregorian
  49. calendars are widely available and so won't be discussed here.
  50.  
  51. The library was compiled using Borland's C++ 4.5 in the small memory
  52. model (which means the code you link it to must also be compiled in
  53. the small memory model) and is fully ANSI compliant. I use the functions
  54. contained in the library on Unix and in a Windows 95 dos box.
  55. All that is required is a 386 or higher IBM compatible PC.
  56. A small demo is provided to show some easy examples of how you can
  57. use the library.
  58.  
  59. (For Unix info see "howto.txt")
  60.  
  61. The library is free and may be used however you wish. However, if this
  62. zip file is redistributed it must contain the original unaltered files:
  63.  
  64. readme.txt
  65. howto.txt
  66. demo.exe
  67. demo.c
  68. cal.c
  69. datelib.h
  70. td.lib
  71.  
  72. If you need a different memory model or have questions, or comments,
  73. drop me a line at: <  bt0202@broncho.ucok.edu  > be sure to include
  74. your e-mail address for a reply.
  75. I will make all source code available for those who request it for
  76. a limited time.
  77.  
  78.  
  79. I am currently working on an "uninstaller" application that will
  80. remove EVERY trace of an unwanted program and will rival any of
  81. the commercially available software. The MSDOS version will probably
  82. be free but any Windows versions will not.
  83. (You should be aware that the Windows 95 "Add/Remove Programs" 
  84. application is only useful when    programmers VOLUNTARILY record
  85. certain entries into the registry.
  86. I have installed dozens of programs that when uninstalled left
  87. the registry littered with invalid references to the program!)
  88.  
  89.  
  90. Brady Tippit  1-26-97
  91. University of Central Oklahoma
  92.  
  93.