C++ check if a date is valid

前端 未结 3 1363
自闭症患者
自闭症患者 2021-02-15 14:48

is there any function to check if a given date is valid or not? I don\'t want to write anything from scratch.

e.g. 32/10/2012 is not valid and 10/10/2010 is valid

3条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-15 15:22

    The boost date time class should be able to handle what you require. See http://www.boost.org/doc/libs/release/doc/html/date_time.html

提交回复
热议问题