SyntaxFix
Write A Post
Hire A Developer
Questions
Timespec has day of year built in.
http://pubs.opengroup.org/onlinepubs/7908799/xsh/time.h.html
#include <time.h> int get_day_of_year(){ time_t t = time(NULL); struct tm tm = *localtime(&t); return tm.tm_yday; }`