Web Hosting - Debt Consolidation - Debt Consolidation - Record Songs for free - Manga

PDA

View Full Version : calculate weeks/hours into min.


scriptsy26
Oct 24th 2008, 3:34 pm
I'm looking for a (extra) script that can calculate weeks and hours into minutes.
I have got the javascript that calculates the difference between times, but it is into weeks,days,hours,min,sec.
and i like it to be only in minutes.

So like this example.
input 1 week and 0 days and 5 hours
Calculate
= 10380 minutes.

If someone knows how to do this please post or pm me.

I would like to thank all for your input.

Thanks
scriptsy26

rhoula
Oct 24th 2008, 8:29 pm
Would you be willing to make a small donation if that is made for you :)

cont911
Oct 24th 2008, 8:31 pm
<script>
function dateToMin(week, day, hour, min)
{
return week * 7 * 24 * 60
+ day * 24 * 60
+ hour * 60
+ min;
}


alert(dateToMin(1, 0, 5, 0));

</script>

cont911
Oct 24th 2008, 8:33 pm
sorry, rhoula, did not see your comment :)

scriptsy26
Oct 27th 2008, 1:25 pm
Thanks both of you. I'm satified with your help.