Skip to main content
edited tags
Link
Doc Brown
  • 214k
  • 34
  • 394
  • 603

I hope this question is alright to ask here. I am trying to make an algorithm that counts how manythe days between 2two dates. For example, e.g. between 3/1/2012 and 3/2/2012. Whats

What is the correct answer, or the most popular choice, and should? Should be the one I use? So in

In this case, if I don't include both dates I am comparing, its 0. Ifthe days are 0; if I include one of them (both the start date), its 1. Lastly,the days are 1; if I include both, itsthe days are 2. Thanks.

I hope this question is alright to ask here. I am trying to make an algorithm that counts how many days between 2 dates. For example, 3/1/2012 and 3/2/2012. Whats the correct answer, or the most popular choice, and should be the one I use? So in this case, if I don't include both dates I am comparing, its 0. If I include one of them (both the start date), its 1. Lastly, if I include both, its 2. Thanks.

I am trying to make an algorithm that counts the days between two dates, e.g. between 3/1/2012 and 3/2/2012.

What is the correct answer, or the most popular choice? Should be the one I use?

In this case, if I don't include both dates I am comparing, the days are 0; if I include one of them, the days are 1; if I include both, the days are 2.

Tweeted twitter.com/#!/StackProgrammer/status/208064068865634305
Source Link
Andy
  • 293
  • 2
  • 3
  • 11
Loading