function takes a person's birthday in year-month-day format and % calculates the number of days until their next birthday from the current % date in matlab
main.m
functiondaysUntilNextBirthday = calculateDaysUntilNextBirthday(birthday) currentYear = year(datetime('today'));
nextBirthday = datetime(currentYear, month(birthday), day(birthday));
if nextBirthday < datetime('today')
nextBirthday = datetime(currentYear+1, month(birthday), day(birthday));
end daysUntilNextBirthday = days(nextBirthday - datetime('today'));
end