What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Request] seconds_since function

[Request] seconds_since function
Author: Message:
Fox-NL
New Member
*


Posts: 7
35 / Male / –
Joined: Oct 2005
O.P. [Request] seconds_since function
Hello!

Can somebody make me a seconds_since function?
The parameters should be day, month and year, something like: seconds_since(day,month,year);... it will return the number of seconds ellapsed since the chosen data


It will be used something like this:

Messenger.MyPersonalMessage = "Today I life "+seconds_since(24,03,1990)+" seconds!";

or:

Messenger.MyPersonalMessage = "I'm 16 for "+seconds_since(24,03,2006)+" seconds!";

Thanks in advance


Got it! Here's the function:
code:
function seconds_since(day, month, year) {
    var myDate=new Date();
    myDate.setFullYear(year,month - 1,day);
    var myDate2=new Date();
    return Math.round((myDate2.getTime() - myDate.getTime()) / 1000);
}

This post was edited on 07-04-2006 at 04:28 PM by Fox-NL.
07-04-2006 10:49 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Request] seconds_since function - by Fox-NL on 07-04-2006 at 10:49 AM
RE: [Request] seconds_since function - by -dt- on 07-04-2006 at 10:52 AM
RE: [Request] seconds_since function - by Fox-NL on 07-04-2006 at 11:05 AM
RE: [Request] seconds_since function - by foaly on 07-04-2006 at 11:14 AM
RE: [Request] seconds_since function - by Fox-NL on 07-04-2006 at 11:21 AM
RE: [Request] seconds_since function - by J-Thread on 07-04-2006 at 11:23 AM
RE: [Request] seconds_since function - by deAd on 07-04-2006 at 04:12 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On