Check wxDateTime components validity more rigorously.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 18 Nov 2010 12:41:13 +0000 (12:41 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 18 Nov 2010 12:41:13 +0000 (12:41 +0000)
commit8b3eb4a0699f201d864c0b151d0f57269cf6316f
tree9344cedac34eb3ba9385e399c0eacd64c02bd1d2
parentca96978a986c924d2868b693dd094a0b35343a46
Check wxDateTime components validity more rigorously.

Check that the provided day is strictly positive and also that the month is in
valid range: while it should always be, considering that it's an enum element,
in practice people often cast ints to wxDateTime::Month with potentially fatal
results. Catch this with an assert in wxDateTime::Tm::IsValid().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66203 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/common/datetime.cpp