Challenge:
Create a function the returns how many days into year a user specified date.
Throw exception for an invalid date.
Function DaysInToYear(D As Integer,
M As Integer,
Y As Integer) As Integer
Return ' To be filled in '
End Function
Example Test Cases
01/01/2012 => 1 31/12/2012 => 366 30/12/2011 => 364
Restrictions
Use of the programming language's built-in date methods and functions, is prohibited.
Score
Least number of non whitespace characters, excluding the following allowances.
Allowances
The function definition signature and structure and the required return keyword.
What is provided above excluding the comments.
This post has been edited by AdamSpeight2008: 04 October 2012 - 10:17 AM

New Topic/Question
Reply



MultiQuote




|