Cody

Solution 1996618

Submitted on 30 Oct 2019 by Nikolaos Nikolaou
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
D = '5-Jan-2018'; y_correct = 1; assert(isequal(Fri(D),y_correct))

m = 1×1 cell array {'Friday'} y = logical 0 y = logical 1

2   Pass
D = '09/09/2019'; y_correct = 0; assert(isequal(Fri(D),y_correct))

[Warning: Successfully converted the text to datetime using the format 'MM/dd/uuuu', but the format is ambiguous and could also be 'dd/MM/uuuu'. To create datetimes from text with a specific format call: datetime(textinput,'InputFormat',infmt) ] [> In guessFormat (line 67) In datetime (line 632) In Fri (line 2) In ScoringEngineTestPoint2 (line 3) In solutionTest (line 5)] m = 1×1 cell array {'Monday'} y = logical 0

3   Pass
D = '2000-01-01'; y_correct = 0; assert(isequal(Fri(D),y_correct))

m = 1×1 cell array {'Saturday'} y = logical 0

4   Pass
D = '2020-12-25'; y_correct = 1; assert(isequal(Fri(D),y_correct))

m = 1×1 cell array {'Friday'} y = logical 0 y = logical 1