diff -Naur boost_1_50_0_beta1/libs/date_time/src/gregorian/date_generators.cpp boost_1_50_0_beta1_patch/libs/date_time/src/gregorian/date_generators.cpp --- boost_1_50_0_beta1/libs/date_time/src/gregorian/date_generators.cpp 2008-02-28 01:30:24.000000000 +0530 +++ boost_1_50_0_beta1_patch/libs/date_time/src/gregorian/date_generators.cpp 2012-06-25 12:27:16.000000000 +0530 @@ -22,7 +22,7 @@ //! Returns nth arg as string. 1 -> "first", 2 -> "second", max is 5. BOOST_DATE_TIME_DECL const char* nth_as_str(int ele) { - if(ele >= 1 || ele <= 5) { + if(ele >= 1 && ele <= 5) { return _nth_as_str[ele]; } else {