Friday or not - MATLAB Cody - MATLAB Central

Problem 44479. Friday or not

Difficulty:Rate

I love Friday. Please tell me whether the day is Friday.

Dateformat is 'yyyy-mm-dd' or 'dd-mmm-yyyy' or 'mm/dd/yyyy'.

Examples;

input D = '2018-01-03'; % Wednesday

output y = 0

input D = '5-Jan-2018'; % Friday

output y = 1

input D = '09/09/2019'; % Monday

output y = 0

Solution Stats

61.29% Correct | 38.71% Incorrect
Last Solution submitted on Apr 15, 2025

Solution Comments

Show comments
Registration Now Open for MathWorks AUTOMOTIVE CONFERENCE 2025
...
Hello Community, We're excited to announce that registration is now open for the...

Problem Recent Solvers76

Suggested Problems

More from this Author9

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page