DateTimeStamp.dat 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. Format of this file is as follows:
  2. Each section begins with a line starting with a colon (:).
  3. The first one or two characters of the second line indicates
  4. the action to be performed:
  5. N - None
  6. A - Add
  7. S - Subtract
  8. I - Convert from RFC 822, a.k.a. Internet format
  9. i - Convert to RFC 822
  10. V - Convert from ISO 8601 (V is for VCalender)
  11. v1 - Convert to ISO 8601 Calender format
  12. v2 - Convert to ISO 8601 Ordinal format
  13. v3 - Convert to ISO 8601 Week format
  14. T - Convert to TTimeStamp (no ouput needed - it's calculated)
  15. The rest of the first line consits of the addition, subtraction,
  16. or conversion format as necessary.
  17. The third line consists of the initial values given to
  18. the TIdDateTimeStamp. This will be in a relevant format to
  19. the test.
  20. The fourth line is the output to be expected.
  21. The format for basic dates uses letters as follows (case sensitive):
  22. Year (Y), Day of year (D), Second (S), Millisecond (L), Time Zone (Z),
  23. 24 Hour (H), 12 Hour (h), Week (W), Day of week (w), Month (M), Day
  24. of Month (d), Minute of Day (m), Minute Of Hour (U), Second of Minute
  25. (s) and Beat time (B) respectively. The Year, Day, Millisecond, and
  26. Time Zone options are valid for all three strings. The Beat Time,
  27. Day of Week, Day of Month and Minute of Hour are only valid for
  28. output. All others are valid for commands and output. Note: that
  29. for initialisation, only those items appearing are set, the others
  30. are left to their defaults. For commands, only those items listed
  31. are performed and for output, only those items listed are checked for.
  32. Note on Seconds and Milliseconds: The first second / millisecond of
  33. the day is zero.
  34. Note on Time Zones: The zones are given as an offset of minutes from
  35. GMT. So +60 is Middle European Time, whereas -60 is British Summer Time.
  36. Weekday numbers: w1 = Sunday, w2 = Monday, w3 = Tuesday, w4 = Wednesday,
  37. w5 = Thursday, w6 = Friday, w7 = Saturday.
  38. Quick summary: Line 1 is a colon. Line 3 initialises the date/time.
  39. Line 4 is the expected output. Line 2 is the action taken place that
  40. should get from Line 3 to Line 4.
  41. : Test 1 - Ensure year zero, day zero does not exist.
  42. N
  43. Y0 D0 S0 L0 Z0
  44. Y1 D1 S0 L0 Z0 B41 W1 w2
  45. : Test 2 - Ensure year zero, day zero does not exist.
  46. S L1
  47. Y1 D1 S0 L0 Z0
  48. Y-1 D365 S86399 L999 Z0 B41
  49. : Test 3 - Simple addition of years.
  50. A Y1
  51. Y1 D1
  52. Y2 D1
  53. : Test 4 - Simple addition of years
  54. A Y4
  55. Y1 D1
  56. Y5 D1
  57. : Test 5 - Simple addition of days
  58. A D1
  59. D2
  60. : Test 6 - Simple addition of days
  61. A D100
  62. D101
  63. : Test 7 - Simple addition of seconds
  64. A S1
  65. S1
  66. : Test 8 - Simple addition of seconds
  67. A S40
  68. S40
  69. : Test 9 - Simple addition of milliseconds
  70. A L1
  71. L1
  72. : Test 10 - Simple addition of milliseconds
  73. A L200
  74. L200
  75. : Test 11 - Simple addition of Months
  76. A M1
  77. M2 d1
  78. : Test 12 - Simple addition of Months
  79. A M12
  80. Y2 M1 D1 d1
  81. : Test 13 - Simple addition of Weeks
  82. A W1
  83. W2 w2
  84. : Test 14 - Simple addition of Weeks
  85. A W50
  86. W51 w2
  87. : Test 15 - Beat time test
  88. N
  89. Z60
  90. B0
  91. : Test 16 - Beat time test
  92. S S1
  93. Z60
  94. B999
  95. : Test 17 - Leap year test
  96. A M1 D28
  97. Y1996
  98. M2 d29
  99. : Test 18 - Non-leap year test.
  100. A M1 D28
  101. Y1997
  102. M3 d1
  103. : Test 19 - One-hundred year non-leap year.
  104. A M1 D28
  105. Y2100
  106. M3 d1
  107. : Test 20 - Four-hundred year leap year.
  108. A M1 D28
  109. Y2000
  110. M2 d29
  111. : Test 21 - Convert from Internet Format
  112. I
  113. Mon, 2 Oct 2000 08:25:57
  114. w2 d2 M10 Y2000 h8 U25 s57
  115. : Test 22 - Convert from Internet Format
  116. I
  117. Sat, 2 Dec 2000 08:25:57
  118. w7 d2 M12 Y2000 h8 U25 s57
  119. : Test 23 - Convert from Internet Format
  120. I
  121. Tue, 2 Oct 2001 08:25:57
  122. w3 d2 M10 Y2001 H8 U25 s57
  123. : Test 24 - Convert from Internet Format
  124. I
  125. 1 Jan 2006 08:25:57
  126. Y2006 d1 h8 U25 s57
  127. : Test 25 - Convert from Internet Format
  128. I
  129. 1 Jan 2034 08:25:57
  130. Y2034 d1 h8 U25 s57
  131. : Test 26 - Add huge number of years.
  132. A Y2147483646
  133. Y2147483647 M1 d1
  134. : Test 27 - Add huge number of days.
  135. A D2147483646
  136. Y5879611 M7 d11
  137. : Test 28 - Add huge number of seconds.
  138. A S2147483647
  139. Y1970 D1
  140. Y2038 M1 d19 H3 U14 s7
  141. : Test 29 - Add huge number of milliseconds.
  142. A L2147483647
  143. Y1 M1 d25 H20 U31 s23 L647
  144. : Test 30 - Convert to Internet Format, first day of 1970, GMT.
  145. i
  146. Y1970
  147. Thu, 1 Jan 1970 00:00:00 +0000
  148. : Test 31 - Convert to Internet Format, first day of 2000, GMT.
  149. i
  150. Y2000
  151. Sat, 1 Jan 2000 00:00:00 +0000
  152. : Test 32 - Convert to Internet Format, 29 Feb 2000, GMT.
  153. i
  154. Y2000 D60 S60000
  155. Tue, 29 Feb 2000 16:40:00 +0000
  156. : Test 33 - Convert to Internet Format '29 Feb' 2001, GMT.
  157. i
  158. Y2001 D60 S10000
  159. Thu, 1 Mar 2001 02:46:40 +0000
  160. : Test 34 - Convert to Internet Format, Middle European Time zone.
  161. i
  162. Y2001 Z60 S45015
  163. Mon, 1 Jan 2001 12:30:15 +0100
  164. : Test 35 - Convert to Internet Format, Pacific Standard Time.
  165. i
  166. Y2001 Z-480 S39015
  167. Mon, 1 Jan 2001 10:50:15 -0800
  168. : Test 36 - Convert to ISO 8601 Calender
  169. v1
  170. Y2000 S39015
  171. 2000-1-1T10:50:15
  172. : Test 37 - Convert to ISO 8601 Ordinal
  173. v2
  174. Y2000 S39015
  175. 2000-1T10:50:15
  176. : Test 38 - Convert to ISO 8601 Week
  177. v3
  178. Y2000 S39015
  179. 2000-W1-7T10:50:15
  180. : Test 39 - Convert from ISO 8601 Calender format
  181. V
  182. 2000-1-1T12:35:15
  183. Y2000 M1 d1 H12 U35 s15
  184. : Test 40 - Convert from ISO 8601 Week format
  185. V
  186. 2004-W14-5T12:35:15
  187. Y2004 W14 w5 H12 U35 s15
  188. : Test 41 - Convert from ISO 8601 Ordinal format
  189. V
  190. 2004-145T12:35:15
  191. Y2004 D145 H12 U35 s15
  192. : Test 42 - Output as TTimeStamp
  193. T
  194. : Test 43 - Output as TTimeStamp
  195. T
  196. Y2
  197. : Test 44 - Output as TTimeStamp
  198. T
  199. Y3
  200. : Test 45 - Output as TTimeStamp
  201. T
  202. Y4
  203. : Test 46 - Output as TTimeStamp
  204. T
  205. Y100
  206. : Test 47 - Output as TTimeStamp
  207. T
  208. Y400
  209. : Test 48 - Output as TTimeStamp
  210. T
  211. Y1970
  212. :Test 49 - Output as TTimeStamp
  213. T
  214. Y2000 D1
  215. :Test 50 - Output as TTimeStamp
  216. T
  217. Y2000 M3 d1
  218. :Test 51 - Output as TTimeStamp
  219. T
  220. Y1999 D365
  221. : Test 52 - Convert timestamp with a missing space from Internet Format
  222. I
  223. Wed,08 Jan 2003 08:09:16 PM
  224. Y2003 d8 M1 H20 U9 s16