Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/libs/date_time/xmldoc/changes.xml @ 20

Last change on this file since 20 was 12, checked in by landauf, 18 years ago

added boost

File size: 23.0 KB
Line 
1<?xml version="1.0" encoding="utf-8"?>
2<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
3"../../../tools/boostbook/dtd/boostbook.dtd">
4
5<!-- Copyright (c) 2001-2005 CrystalClear Software, Inc.
6     Subject to the Boost Software License, Version 1.0.
7     (See accompanying file LICENSE-1.0 or  http://www.boost.org/LICENSE-1.0)
8-->
9
10<section id="date_time.changes">
11  <title>Change History</title>
12 
13  <!-- if each new change tgroup has a "Bug Fix" as the first "Type", the columns will line up nicely -->
14
15  <bridgehead renderas="sect3">Changes from Boost 1.32 to 1.33 (date_time 1.03 to 1.04)</bridgehead>
16  <informaltable frame="all">
17    <tgroup cols="2">
18      <thead>
19        <row>
20          <entry>Type</entry>
21          <entry>Description</entry>
22        </row>
23      </thead>
24      <tbody>
25        <row>
26          <entry>Bug Fix</entry>
27          <entry>Period lengths, when beginning and end points are the same, or are consecutive, were being incorrectly calculated. The corrected behavior, where end and beginning points are equal, or a period is created with a zero duration, now return a length of zero. A period where beginning and end points are consecutive will return a length of one.
28          </entry>
29        </row>
30        <row>
31          <entry>Bug Fix</entry>
32          <entry>Time_input_facet was missing functions to set iso formats. It also failed to parse time values that did not use a separator (%H%M%S). Both these bugs have been corrected.
33          </entry>
34        </row>
35        <row>
36          <entry>Feature</entry>
37          <entry>Preliminary names of ptime_facet and ptime_input_facet changed to simply time_facet and time_input_facet. The ptime_* versions have been removed all together.
38          </entry>
39        </row>
40        <row>
41          <entry>Feature</entry>
42          <entry>The from_iso_string function failed to parse fractional digits. We added code that correctly parses when input has more digits, or too few digits, that the compiled library precision. Ptimes with only a decimal are also correctly parsed.
43          </entry>
44        </row>
45        <row>
46          <entry>Bug Fix</entry>
47          <entry>The parsing mechanism in the new IO would consume the next character after a match was made. This bug presented itself when attempting to parse a period that had special value for it's beginning point.
48          </entry>
49        </row>
50        <row>
51          <entry>Bug Fix</entry>
52          <entry>The new IO system failed to provide the ability for the user to "turn on" exceptions on the stream. The failbit was also not set when parsing failed. Both of these problems have been fixed.
53          </entry>
54        </row>
55        <row>
56          <entry>Bug Fix</entry>
57          <entry>Parsing of special values, by means of from_*_string functions, has been fixed. This also effects the libraries ability to serialize special values. Time_duration now serializes as either a string or individual fields (depending on is_special()).
58          </entry>
59        </row>
60        <row>
61          <entry>Bug Fix</entry>
62          <entry>Previously, output streaming of <code>partial_date</code> would display the day as either a single or double digit integer (ie '1', or '12'). This has been corrected to always display a double digit integer (ie '01').
63          </entry>
64        </row>
65        <row>
66          <entry>Feature</entry>
67          <entry>Major new features related to management of local times.
68                 This includes the introduction of a series of new classes to
69                 represent time zones and local times (see <link linkend="date_time.local_time">Date Time Local Time</link> for complete details).
70          </entry>
71        </row>
72        <row>
73          <entry>Feature</entry>
74          <entry>Input and output facets have been re-written to support format-based
75            redefinition of formats (see <link linkend="date_time.date_time_io">Date Time IO</link> for complete details).
76          </entry>
77        </row>
78        <row>
79          <entry>Feature</entry>
80          <entry>Functions have been added to facilitate conversions between <code>tm</code> structs for <code>date</code>, <code>ptime</code>, <code>time_duration</code>, and <code>local_date_time</code>. Functions for converting <code>FILETIME</code>, and <code>time_t</code> to <code>ptime</code> are also provided. See the individual sections for details.
81          </entry>
82        </row>
83        <row>
84          <entry>Feature</entry>
85          <entry>A <code>universal_time</code> function has been added to the <code>microsec_time_clock</code> (full details of this function can be found <link linkend="ptime_from_clock">here</link>).
86          </entry>
87        </row>
88        <row>
89          <entry>Feature</entry>
90          <entry>Functions have been added to facilitate conversions between <code>tm</code> structs for <code>date</code>, <code>ptime</code>, <code>time_duration</code>, and <code>local_date_time</code>. Functions for converting <code>FILETIME</code>, and <code>time_t</code> to <code>ptime</code> are also provided. See the individual sections for details.
91          </entry>
92        </row>
93        <row>
94          <entry>Feature</entry>
95          <entry>A <code>universal_time</code> function has been added to the <code>microsec_time_clock</code> (full details of this function can be found <link linkend="ptime_from_clock">here</link>).
96          </entry>
97        </row>
98        <row>
99          <entry>Feature</entry>
100          <entry>Date-time now uses reentrant POSIX functions on those platforms that
101                 support them when BOOST_HAS_THREADS is defined.
102          </entry>
103        </row>
104        <row>
105          <entry>Bug Fix</entry>
106          <entry>Fixed a bug in serialization code where special values
107                (not-a-date-time, infinities, etc) for
108                ptime, time_duration would not read back correctly from an archive. 
109                The output serialization code wrote subfields such
110                as time_duration.seconds() which are invalid for special values and
111                thus undefined values.  Thus when read back the values could cause
112                strange behavior including execeptions on construction.
113          </entry>
114        </row>
115        <row>
116          <entry>Bug Fix</entry>
117          <entry>Fixed multiple warnings generated with various platforms/compilers.
118          </entry>
119        </row>
120        <row>
121          <entry>Bug Fix</entry>
122          <entry>Construction of a ptime with a time_duration beyond the range of 00:00 to 23:59:59.9... now adjusts the date and time to make the time_duration fall within this range (ie <code>ptime(date(2005,2,1), hours(-5))</code> -> "2005-Jan-31 19:00:00" &amp; <code>ptime(date(2005,2,1), hours(35))</code> -> "2005-Feb-02 11:00:00").
123          </entry>
124        </row>
125        <row>
126          <entry>Bug Fix</entry>
127          <entry>Time parsing now correctly handles excessive digits for fractional seconds. Leading zeros are dropped ("000100" -> 100 frac_sec), and excessive digits are truncated at the proper place ("123456789876" -> 123456 or 123456789 depending on what precision the library was compiled with).
128          </entry>
129        </row>
130        <row>
131          <entry>Bug Fix</entry>
132          <entry>Changes to the <code>boost::serialization</code> interface broke serialization compatibility for <code>date_time</code>. The user must provide a function to insure <code>date_time</code> objects are <code>const</code> before they are serialized. The function should be similar to:
133            <screen>template&lt;class archive_type, class temporal_type>
134void save_to(archive_type&amp; ar,
135             const temporal_type&amp; tt)
136{
137  ar &lt;&lt; tt;
138}</screen>
139          </entry>
140        </row>
141        <row>
142          <entry>Bug Fix</entry>
143          <entry>Use of the depricated <code>boost::tokenizer</code> interface has been updated to the current interface. This fixes compiler errors on some older compilers.
144          </entry>
145        </row>
146        <row>
147          <entry>Bug Fix</entry>
148          <entry>Templatized formatters in the legacy IO system to accept char type. Also removed calls to <code>boost::lexical_cast</code>.
149          </entry>
150        </row>
151      </tbody>
152    </tgroup>
153  </informaltable>
154
155
156  <bridgehead renderas="sect3">Changes from Boost 1.31 to 1.32 (date_time 1.02 to 1.03)</bridgehead>
157  <informaltable frame="all">
158    <tgroup cols="2">
159      <thead>
160        <row>
161          <entry>Type</entry>
162          <entry>Description</entry>
163        </row>
164      </thead>
165      <tbody>
166        <row>
167          <entry>Bug Fix</entry>
168          <entry>Snap to end of month behavior corrected for year_functor. Previously, starting
169                 from 2000-Feb-28 (leap year and not end of month) and iterating through the next
170                 leap year would result in 2004-Feb-29 instead of 2004-Feb-28. This behavior has
171                 been corrected to produce the correct result of 2004-Feb-28. Thanks to Bart Garst
172                 for this change.
173          </entry>
174        </row>
175        <row>
176          <entry>Feature</entry>
177          <entry>Free function for creating a ptime object from a FILETIME struct. This function
178                 is only available on platforms that define BOOST_HAS_FTIME.
179          </entry>
180        </row>
181        <row>
182          <entry>Feature</entry>
183          <entry>Microsecond time clock is now available on most windows compilers as well as
184                 Unix.
185          </entry>
186        </row>
187        <row>
188          <entry>Feature</entry>
189          <entry>Use of the boost::serialization library is now available with most of the
190                 date_time classes. Classes capable of serialization are: date_generator classes,
191                 date, days, date_period, greg_month, greg_weekday, greg_day, ptime, time_duration,
192                 and time_period. Thanks to Bart Garst for this change.
193          </entry>
194        </row>
195        <row>
196          <entry>Feature</entry>
197          <entry>Functions added to convert date and time classes to wstring. The library now
198                 provides to_*_wstring as well as to_*_string functions for: simple, iso,
199                 iso_extended, and sql for dates and compilers that support wstrings. Thanks to
200                 Bart Garst for this change.
201          </entry>
202        </row>
203        <row>
204          <entry>Feature</entry>
205          <entry>Period classes now handle zero length and NULL periods correctly. A NULL period
206                 is a period with a negative length. Thanks to Frank Wolf and Bart Garst for this
207                 change.
208          </entry>
209        </row>
210        <row>
211          <entry>Feature</entry>
212          <entry>Added end_of_month function to gregorian::date to return the last day of
213                 the current month represented by the date.  Result is undefined for
214                 not_a_date_time or infinities.
215          </entry>
216        </row>
217        <row>
218          <entry>Bug Fix</entry>
219          <entry>Removed incorrect usage of BOOST_NO_CWCHAR macro throughout library.
220          </entry>
221        </row>
222        <row>
223          <entry>Feature</entry>
224          <entry>New names added for some date classes. Original names are still valid but may
225                 some day be deprecated. Changes are:
226            <simplelist type='horiz' columns='3'>
227              <member>date_duration</member>
228              <member>is now</member>
229              <member>days</member>
230              <member>nth_kday_of_month</member>
231              <member>is now</member>
232              <member>nth_day_of_the_week_in_month</member>
233              <member>first_kday_of_month</member>
234              <member>is now</member>
235              <member>first_day_of_the_week_in_month</member>
236              <member>last_kday_of_month</member>
237              <member>is now</member>
238              <member>last_day_of_the_week_in_month</member>
239              <member>first_kday_after</member>
240              <member>is now</member>
241              <member>first_day_of_the_week_after</member>
242              <member>first_kday_before</member>
243              <member>is now</member>
244              <member>first_day_of_the_week_before</member>
245            </simplelist>
246          </entry>
247        </row>
248        <row>
249          <entry>Feature</entry>
250          <entry>Free functions for date generators added. Functions are: days_until_weekday, days_before_weekday, next_weekday, and previous_weekday.
251            <screen>days days_until_weekday(date, greg_weekday);
252days days_before_weekday(date, greg_weekday);
253date next_weekday(date, greg_weekday);
254date previous_weekday(date, greg_weekday);</screen>
255            Thanks to Bart Garst for this change.
256          </entry>
257        </row>
258        <row>
259          <entry>Feature</entry>
260          <entry>New experimental duration types added for months, years, and weeks. These classes
261                 also provide mathematical operators for use with date and time classes.  Be aware
262                 that adding of months or years a time or date past the 28th of a month may show
263                 non-normal mathematical properties.  This is a result of 'end-of-month'
264                 snapping used in the calculation.  The last example below illustrates the   
265                 issue. 
266           
267            <screen>months m(12);
268years y(1);
269m == y; // true
270days d(7);
271weeks w(1);
272d == w; // true
273ptime t(...);
274t += months(3);
275date d(2004,Jan,30);
276d += months(1); //2004-Feb-29
277d -= months(1); //2004-Jan-29</screen>
278            Input  streaming is not yet implemented for these types.             
279            Thanks to Bart Garst for this change.
280          </entry>
281        </row>
282        <row>
283          <entry>Feature</entry>
284          <entry>Unifying base class for date_generators brought in to gregorian namespace. See <link linkend="date_time.examples.print_holidays">Print Holidays Example</link>.
285          </entry>
286        </row>
287        <row>
288          <entry>Feature</entry>
289          <entry>Added constructors for date and ptime that allow for default construction (both)
290                 and special values construction (ptime, both now support this). Default
291                 constructors initialize the objects to not_a_date_time (NADT).
292                 <screen>ptime p_nadt(not_a_date_time);
293ptime p_posinf(pos_infin);
294ptime p; // p == NADT
295date d;  // d == NADT</screen>
296            Thanks to Bart Garst for this change.
297          </entry>
298        </row>
299        <row>
300          <entry>Feature</entry>
301          <entry>Output streaming now supports wide stream output on compiler / standard library combinations that support wide streams. This allows code like:
302            <screen>std::wstringstream wss;
303date d(2003,Aug,21);
304wss &lt;&lt; d;</screen>
305            Thanks to Bart Garst for this change.
306          </entry>
307        </row>
308        <row>
309          <entry>Feature</entry>
310          <entry>Input streaming for date and time types is now supported on both wide and narrow streams:
311            <screen>date d(not_a_date_time);
312std::stringstream ss("2000-FEB-29");
313ss &gt;&gt; d; //Feb 29th, 2000
314std::wstringstream ws("2000-FEB-29");
315ws &gt;&gt; d; //Feb 29th, 2000</screen>
316            Thanks to Bart Garst for this change.
317          </entry>
318        </row>
319        <row>
320          <entry>Bug Fix</entry>
321          <entry> Fixed bug in duration_from_string() where a string formatted with
322                  less than full amount of fractional digits created an incorrect
323                  time_duration.  With microsecond resolution for time durations
324                  the string "1:01:01.010" created a time duration of
325                  01:01:01.000010 instead of 01:01:01.010000
326          </entry>
327        </row>
328        <row>
329          <entry>Bug Fix</entry>
330          <entry>Fixed the special value constructor for gregorian::date and posix_time::ptime
331                 when constructing with min_date_time or max_date_time.  The wrong value was
332                 constructed for these.
333          </entry>
334        </row>
335      </tbody>
336    </tgroup>
337  </informaltable>
338 
339  <bridgehead renderas="sect3">Changes from Boost 1.30 to 1.31 (date_time 1.01 to 1.02)</bridgehead>
340  <informaltable frame="all">
341    <tgroup cols="2">
342      <thead>
343        <row>
344          <entry>Type</entry>
345          <entry>Description</entry>
346        </row>
347      </thead>
348      <tbody>
349        <row>
350          <entry>Bug Fix</entry>
351          <entry>Build configuration updated so dll, statically, and dynamically linkable library files are now produced with MSVC compilers. See <link linkend="date_time.buildinfo">Build/Compiler Information</link> for more details.</entry>
352        </row>
353        <row>
354          <entry>Bug Fix</entry>
355          <entry>Time_duration from_string is now correctly constructed from a negative value. (ie "-0:39:00.000") Code provided by Bart Garst.</entry>
356        </row>
357        <row>
358          <entry>Bug Fix</entry>
359          <entry>Fixed many MSVC compiler warnings when compiled with warning level 4.</entry>
360        </row>
361        <row>
362          <entry>Feature</entry>
363          <entry>Added prefix decrement operator (--) for date and time iterators. See <link linkend="date_time.posix_time.time_iterators">Time Iterators</link>  and <link linkend="date_time.gregorian.date_iterators">Date Iterators</link> for more details. Code provided by Bart Garst.</entry>
364        </row>
365        <row>
366          <entry>Feature</entry>
367          <entry>Special_values functionality added for date_duration, time_duration and time classes. Code provided by Bart Garst.</entry>
368        </row>
369        <row>
370          <entry>Bug Fix</entry>
371          <entry>Fixed time_duration_traits calculation bug which was causing time duration to be limited to 32bit range even when 64 bits were available. Thanks to Joe de Guzman for tracking this down.</entry>
372        </row>
373        <row>
374          <entry>Bug Fix</entry>
375          <entry>Provided additional operators for duration types (eg: date_duration, time_duration). This includes dividable by integer and fixes to allow +=, -= operators. Thanks to Bart Garst for writing this code. Also, the documentation of <link linkend="date_time.calculations">Calculations</link> has been improved.</entry>
376        </row>
377        <row>
378          <entry>Bug Fix</entry>
379          <entry>Added typedefs to boost::gregorian gregorian_types.hpp various date_generator function classes.</entry>
380        </row>
381        <row>
382          <entry>Feature</entry>
383          <entry>Added from_time_t function to convert time_t to a ptime.</entry>
384        </row>
385        <row>
386          <entry>Feature</entry>
387          <entry>Added a span function for combining periods. See <link linkend="date_time.gregorian.date_period">date period</link> and <link linkend="date_time.posix_time.time_period">time period</link> docs.</entry>
388        </row>
389        <row>
390          <entry>Feature</entry>
391          <entry>Added a function to time_duration to get the total number of seconds in a
392                 duration truncating any fractional seconds. In addition, other resolutions
393                 were added to allow for easy conversions. For example
394            <screen>seconds(1).total_milliseconds() == 1000
395seconds(1).total_microseconds() == 1000000
396hours(1).total_milliseconds() == 3600*1000 //3600 sec/hour
397seconds(1).total_nanoseconds() == 1000000000</screen>
398
399           </entry>
400        </row>
401        <row>
402          <entry>Feature</entry>
403          <entry>Added output streaming operators for the <link linkend="date_time.gregorian.date_algorithms">date generator</link> classes - partial_date, first_kday_after, first_kday_before, etc. Thanks to Bart Garst for this work.</entry>
404        </row>
405        <row>
406          <entry>Feature</entry>
407          <entry>Added unary- operators for durations for reversing the sign of a time duration. For example:
408            <screen>time_duration td(5,0,0); //5 hours
409td = -td; //-5 hours</screen>
410          Thanks to Bart Garst for this work.</entry>
411        </row>
412        <row>
413          <entry>Feature</entry>
414          <entry>Added support for parsing strings with 'month names'. Thus creating a date object from string now accepts multiple formats ("2003-10-31","2003-Oct-31", and "2003-October-31"). Thus, date d = from_simple_string("2003-Feb-27") is now allowed. A bad month name string ( from_simple_string("2003-SomeBogusMonthName-27")) will cause a bad_month exception. On most compilers the string compare is case insensitive. Thanks to Bart Garst for this work.</entry>
415        </row>
416        <row>
417          <entry>Feature</entry>
418          <entry>In addition to support for month names or numbers, functions have been added to create date objects from multi-ordered date strings. Ex: "January-21-2002", "2002-Jan-21", and "21-Jan-2003". See <link linkend="date_time.gregorian.date_class">Date Class</link> for more details.</entry>
419        </row>
420        <row>
421          <entry>Bug-Fix</entry><!-- leave '-' so table cell doesn't wrap -->
422          <entry>Various documentation fixes. Thanks to Bart Garst for updates.</entry>
423        </row>
424      </tbody>
425    </tgroup>
426  </informaltable>
427 
428  <bridgehead renderas="sect3">Changes from Boost 1.29 to 1.30 (date_time 1.00 to 1.01)</bridgehead>
429  <para>
430    Notice: The interface to the partial_date class (see <link linkend="date_time.gregorian.date_algorithms">date_algorithms</link>) was changed. The order of construction parameters was changed which will cause some code to fail execution. This change was made to facilitate more generic local time adjustment code. Thus instead of specifying partial_date pd(Dec,25) the code needs to be changed to partial_date pd(25, Dec);
431  </para>
432  <informaltable frame="all">
433    <tgroup cols="2">
434      <thead>
435        <row>
436          <entry>Type</entry>
437          <entry>Description</entry>
438        </row>
439      </thead>
440      <tbody>
441        <row>
442          <entry>Bug Fix</entry>
443          <entry>Added new experimental feature for Daylight Savings Time calculations. This allows traits based specification of dst rules.</entry>
444        </row>
445        <row>
446          <entry>Feature</entry>
447          <entry>Added new interfaces to calculate julian day and modified julian day to the gregorian date class. See <link linkend="date_time.gregorian.date_class">boost::gregorian::date</link>.</entry>
448        </row>
449        <row>
450          <entry>Feature</entry>
451          <entry>Add new interface to calculate iso 8601 week number for a date. See <link linkend="date_time.gregorian.date_class">boost::gregorian::date</link>.</entry>
452        </row>
453        <row>
454          <entry>Feature</entry>
455          <entry>Add an iso 8601 time date-time format (eg: YYYYMMDDTHHHMMSS) parsing function. See <link linkend="date_time.posix_time.ptime_class">Class ptime</link> for more information.</entry>
456        </row>
457        <row>
458          <entry>Feature</entry>
459          <entry> Added a length function to the period template so that both date_periods and time_periods will now support this function.</entry>
460        </row>
461        <row>
462          <entry>Bug Fix</entry>
463          <entry>Split Jamfiles so that libs/date_time/build/Jamfile only builds library and /libs/date_time/libs/test/Jamfile which runs tests.</entry>
464        </row>
465        <row>
466          <entry>Bug Fix</entry>
467          <entry>Fixed many minor documentation issues.</entry>
468        </row>
469        <row>
470          <entry>Bug Fix</entry>
471          <entry>Removed the DATE_TIME_INLINE macro which was causing link errors. This macro is no longer needed in projects using the library.</entry>
472        </row>
473        <row>
474          <entry>Bug Fix</entry>
475          <entry>Added missing typedef for year_iterator to gregorian_types.hpp</entry>
476        </row>
477        <row>
478          <entry>Bug Fix</entry>
479          <entry>Fixed problem with gregorian ostream operators that prevented the use of wide streams.</entry>
480        </row>
481        <row>
482          <entry>Bug-Fix</entry><!-- leave '-' so table cell doesn't wrap -->
483          <entry>Tighten error handling for dates so that date(2002, 2, 29) will throw a bad_day_of_month exception. Previously the date would be incorrectly constructed. Reported by sourceforge bug: 628054 among others.</entry>
484        </row>
485      </tbody>
486    </tgroup>
487  </informaltable>
488</section>
Note: See TracBrowser for help on using the repository browser.