id summary reporter owner description type status milestone component version severity resolution keywords cc
2805 Add Documentation to Date_Time to Highlight a Pitfall Charles Brockman az_sw_dude "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, ''date A < date B'' if A is a valid date and B is ''not_a_date_time'', a Boolean true is returned. A programmer may expect that any comparison of valid date with ''not_a_date_time'' always returns false. In some cases it will return true.
In the ''\libs\date_time\xmldoc\date_class.xml'' file in the Operator table of the Gregorian Date System section I suggest the following text.
''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.''
The tests for the various comparisons are included in a patch contained in Trac #2804.
" Bugs new Boost 1.39.0 date_time Boost 1.38.0 Problem