c++ - How to calculate number of workdays between two given date -
ex. if give 2013-7-1 2013-7-7 , there 5 workdays (mon-fri) , output should 5 ps: in problem holidays excepted, consider weekends. does have idea of implementing c++? sorry isn't commented , i'm not professional programmer here go: compiles , when run , type in 1/1/2013/3 , 12/31/2013/3 261 work days year. if multiply 365*(5/7) 260.7 seems work. when 1/1/2013/3 , 12/31/2015/5 783. programmed leap year in less 90 lines. naming conventions might not consistent. know it's bad style use nested if statements whatever quick , dirty thing. edit: decided make more ellaborate practice own c++ skills, i've provided more functionality it. #include <iostream> #include <string> #include <vector> #include <sstream> using namespace std; class date{ public: unsigned days_per_month[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; unsigned month; unsigned day; int year; unsigned week_day; constexpr static int week_day_callibrator[4...