Boost C++ Libraries: Ticket #2805: Add Documentation to Date_Time to Highlight a Pitfall https://svn.boost.org/trac10/ticket/2805 <p> A note should be added to the Date_Time documentation to warn programmers of a pitfall in the use of the comparison operators. Comparison of a valid date with not_a_date_time may return an unexpected result. In the expression, <em>date A &lt; date B</em> if A is a valid date and B is <em>not_a_date_time</em>, a Boolean true is returned. A programmer may expect that any comparison of valid date with <em>not_a_date_time</em> always returns false. In some cases it will return true. </p> <p> In the <em>\libs\date_time\xmldoc\date_class.xml</em> file in the Operator table of the Gregorian Date System section I suggest the following text. </p> <p> <em>Warning: Some comparisons of valid dates and not_a_date_time will return true. See the \libs\date_time\test\gregorian\testdate.cpp program for illustrations of the comparisons.</em> </p> <p> The tests for the various comparisons are included in a patch contained in Trac <a class="new ticket" href="https://svn.boost.org/trac10/ticket/2804" title="#2804: Bugs: Add Some Missing Items to the Date_Time Tests (new)">#2804</a>. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2805 Trac 1.4.3