با استفاده از کتابخانه boost به صورت زیر تاریخ را کنترل کنید:
#include <boost/date_time/gregorian/gregorian.hpp>
boost::gregorian::date start_date(2020, 6, 10);
boost::gregorian::date end_date(2020, 8, 10);
auto now_d = boost::gregorian::day_clock::local_day();
if ( start_date <= now_d && now_d <= end_date){
//control code here
}