scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

_daysyear.c (194B)


      1 int _daysmon[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
      2 
      3 int
      4 _daysyear(int year)
      5 {
      6 	if (year%4 != 0)
      7 		return 365;
      8 	if (year%100 == 0 && year%400 != 0)
      9 		return 365;
     10 	return 366;
     11 }