Easy Sequences 4: Eliminate the Days of Confusion - MATLAB Cody - MATLAB Central

Problem 52522. Easy Sequences 4: Eliminate the Days of Confusion

Difficulty:Rate
If a date is written in purely numeric format some dates can be confusing, if we don't know the date format used. For example, "05-02-1998", may mean either "May 02, 1998" or "February 05, 1998". However, since there are only 12 months in a year, not all dates are confusing. "23-10-1969" is clearly "October 23, 1969".
Write a program that will count the number of days between two dates (inclusive) that are NOT confusing on either "dd-mm-yyyy" or "mm-dd-yyyy" formats.
To avoid further confusion you are given the input in "yyyy-mm-dd" date format.

Solution Stats

46.77% Correct | 53.23% Incorrect
Last Solution submitted on Jan 17, 2025

Problem Comments

Solution Comments

Show comments

Group

Easy Sequences Volume I Image
Easy Sequences Volume I
  • 10 Problems
  • 8 Finishers

Problem Recent Solvers21

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