my problem is to calculate the progressive number of a day
1 1 2020 ---> corresponds to the first day of the year
2 2 2020 ---> corresponds to 33rd day of the year
How I can calculate the number of day of year ?
sample
0059 is 29.02.2020
if (month == 1)
nprog = g; // in the case of January
else
nprog = (30 * (month-1)) + day; // I put it on the 30th, taking it for granted that every month they have 30 days
But I'm not sure that's the case ... help me