Cody

Solution 1530621

Submitted on 16 May 2018 by J. S. Kowontan
  • Size: 13
  • This is the leading solution.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
start = '09-Oct-2016'; for i = 1:10 date = datestr(datenum(start) + i); doy_correct = 283 + i; doy = dayoftheyear(date); assert(isequal(doy, doy_correct)); end start = '04-Oct-1937'; for i = 1:10 date = datestr(datenum(start) + i); doy_correct = 277 + i; doy = dayoftheyear(date); assert(isequal(doy, doy_correct)); end