Reply to Date difference in days....

Your name:

Reply:


Posted by Simon Dean on 10/23/27 11:35

Probably being a little thick here, but when you subtract one date away
from another, how do you convert the resultant value into a number of
days... I guess I could easily / 60 / 60 / 24... but that seems
barbaric... Anything neater?

Cheers
Simon

Ps, Im also just trying to work out how to calculate the number of
mondays and tuesdays etc between two dates... Just thought I'd run this
theory past you if I may to gain more confidence.

I figure getting the date difference, and knowing that the starting date
falls on a Thursday holds the key... working out the days between these
two dates should be easy enough to divide by 7 to get the whole number
and remainder (is that a mod?)... we can just say there's x number of
Wednesdays, x number of Thursdays etc, and then just loop through the
remainder which is a small number so not much of system load?

then we can work out how many of those days were working days, subtract
holiday dates from each count... and... well, that's my thoughts so far...

Workable?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация