- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
void DayNumbSat (double day, int month, double year, double days) {
int FirstJan, DayNumb;
char *Sat;
FirstJan = (long) days%7 - 1;
switch ( month ) {
case 1: DayNumb = day;
break;
case 2: DayNumb = 31 + day;
break;
case 3: DayNumb = 31 + 28 + day;
break;
case 4: DayNumb = 31*2 + 28 + day;
break;
case 5: DayNumb = 31*2 + 28 + 30 + day;
break;
case 6: DayNumb = 31*3 + 28 + 30 + day;
break;
case 7: DayNumb = 31*3 + 28 + 30*2+day;
break;
case 8: DayNumb = 31*4 + 28 + 30*2 + day;
break;
case 9: DayNumb = 31*5 + 28 + 30*2 + day;
break;
case 10: DayNumb = 31*5 + 28 + 30*3 +day;
break;
case 11: DayNumb = 31*6 + 28 + 30*3 +day;
break;
case 12: DayNumb = 31*7+30*4+28+day;
break;
}
printf("\n%d PASSED SINCE 1ST OF JANUARY\n", DayNumb);