create a function that returns day difference between two dates (inclusive),


hi all

i wanna create function returns day difference between 2 dates (inclusive), without using any
function provided platform or external library. function must work dates in the
range of 1st january, 1901 through 31st december 2999, inclusive. example, there 5 days in
range bounded 15th march, 2004 , 19th march, 2004.

note-kindly consider leap year well.

thanks

mdx.

" without using any function provided platform or external library"


you'll have decide means - not using framework or "functions provided platform" make difficult.

if can use framework, datetime , timespan structures first place look... provide necessary methods you'd use here.

if want avoid primitive types (not sure draw line), you'll need good algorithm determining whether year leap year, implement it, , use determine number of days per year, etc.


reed copsey, jr. - http://reedcopsey.com
if post answers question, please click "mark answer" on post , "mark helpful".



Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'