> > > select 2, 28 + (CAST(strftime("%j", c.year||"-12-31") AS INTEGER) % 365) >
Here you assume that all years have either 365 or 366 days. Would that it were so! Look at the year 1752 -- you may notice something odd happened that September. :-) Eric