Given an input string of the form 'yyyy-mm-dd' or 'yyyy-mm-dd hh:mm:ss', return a string message indicating how many days, hours, minutes and seconds are left to the NewYear ball drop. Examples:
Input = '2014-05-26 10:15:45'; Output = '219 days, 13 hours, 44 minutes, 15 seconds to go.'
Input = '2014-12-31 10:15:45';; Output = '000 days, 13 hours, 44 minutes, 15 seconds to go.'
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers26
Suggested Problems
-
Remove all the words that end with "ain"
2660 Solvers
-
7307 Solvers
-
Extract leading non-zero digit
2246 Solvers
-
10309 Solvers
-
The Answer to Life, the Universe, and Everything
579 Solvers
More from this Author2
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!