Cody

Solution 2202645

Submitted on 9 Apr 2020 by Michael Jarboe
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
x = '01-Jan-1990'; y_correct = 6; assert(isequal(FindMyBday(x),y_correct))

x = datetime 01-Jan-1991 x = datetime 01-Jan-1992 x = datetime 01-Jan-1993 x = datetime 01-Jan-1994 x = datetime 01-Jan-1995 x = datetime 01-Jan-1996 age = 6

2   Pass
x = '04-Sep-1985'; y_correct = 6; assert(isequal(FindMyBday(x),y_correct))

x = datetime 04-Sep-1986 x = datetime 04-Sep-1987 x = datetime 04-Sep-1988 x = datetime 04-Sep-1989 x = datetime 04-Sep-1990 x = datetime 04-Sep-1991 age = 6

3   Pass
x = '29-Feb-1970'; y_correct = 11; assert(isequal(FindMyBday(x),y_correct))

4   Pass
x = '01-Aug-2000'; y_correct = 6; assert(isequal(FindMyBday(x),y_correct))

x = datetime 01-Aug-2001 x = datetime 01-Aug-2002 x = datetime 01-Aug-2003 x = datetime 01-Aug-2004 x = datetime 01-Aug-2005 x = datetime 01-Aug-2006 age = 6

5   Pass
x = '26-Jun-2012'; y_correct = 6; assert(isequal(FindMyBday(x),y_correct))

x = datetime 26-Jun-2013 x = datetime 26-Jun-2014 x = datetime 26-Jun-2015 x = datetime 26-Jun-2016 x = datetime 26-Jun-2017 x = datetime 26-Jun-2018 age = 6

6   Pass
x = '16-Jun-1983'; y_correct = 5; assert(isequal(FindMyBday(x),y_correct))

x = datetime 16-Jun-1984 x = datetime 16-Jun-1985 x = datetime 16-Jun-1986 x = datetime 16-Jun-1987 x = datetime 16-Jun-1988 age = 5