<<< Procedural approach | Index | Problems with procedural approach >>> |
Since we found a way to replace "3/8/2010" with int representation, making calculations and comparing dates becomes easy:
serial_date = serial_date + 100; // add 100 days if ( serial_date < today ) { // compare dates // the date is in the past ("less than today") // ... } int age = serial_2_year( today ) - serial_2_year( serial_date );
<<< Procedural approach | Index | Problems with procedural approach >>> |