0

How to fine total number of days and nights between 2 given datetime in java script.

For Example if I am giving input as -

 date1=2013-11-10 21:26:36
 date2=2013-11-12 23:26:36

It should give output as 2-days and 3-nights.

I am new to java-script and facing problem in how to start this function. please help.
I have googled but not found any code or way to make this functoin.

Ankit Kumar
  • 393
  • 2
  • 3
  • 18
  • 3
    Have a look at http://momentjs.com/ – pax162 Nov 10 '13 at 16:05
  • Have a look at [How do I get the number of days between two dates in JavaScript?](http://stackoverflow.com/q/542938/218196) and additionally check the time to find out whether to include the start and end date or not. – Felix Kling Nov 10 '13 at 16:05

0 Answers0