Cody

Problem 45207. Calculate days until Christmas

Solution 2817040

Submitted on 10 Aug 2020 by William Gonzalez
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
assert(isequal(daysUntilChristmas(2019,11,19),36))

day = 737748 num = 36

2   Pass
assert(isequal(daysUntilChristmas(2018,12,28),362))

day = 737422 num = 362

3   Pass
assert(isequal(daysUntilChristmas(2019,01,01),358))

day = 737426 num = 358

4   Pass
assert(isequal(daysUntilChristmas(2019,12,30),361))

day = 737789 num = 361

Suggested Problems

More from this Author5

Community Treasure Hunt

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

Start Hunting!