Problem 42352. Days until next NewYear ball drop

Given a date string in the form 'yyyy-mm-dd' or 'yyyy-mm-dd hh:mm:ss', calculate the number of days until the dropping of the NewYear ball at Times Square (i.e., Dec 31st at midnight) of that year. Examples:

    y = Days2NYE('2014-05-26') = 220 or
    y = Days2NYE('2014-05-26 10:15:45') = 219

Solution Stats

59.38% Correct | 40.63% Incorrect
Last Solution submitted on Apr 09, 2020