Problem 2198. Find my birthday
Given a birth date x, find my age when my birth day will fall on the same day as I was born. So if I was born on Monday, what age will I be when my birthday once again falls on a Monday.
There can be multiple outputs of this. You need to return first occurrence.
Solution Stats
Problem Comments
-
2 Comments
Paul Berglund
on 23 Mar 2014
The answer for '29-Feb-1970' should probably be NaN
Rafael S.T. Vieira
on 4 Sep 2020
There is no 29th on February 1970. The solution is to count it as the 50th day of the year, but this should be stated at the problem description.
Solution Comments
Show commentsProblem Recent Solvers77
Suggested Problems
-
Number of 1s in the Binary Representation of a Number
447 Solvers
-
1889 Solvers
-
Is this date a palindrome?emordnilap a etad siht sI
65 Solvers
-
Generate N equally spaced intervals between -L and L
873 Solvers
-
Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)
731 Solvers
More from this Author25
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!