/    Sign up×
Community /Pin to ProfileBookmark

Elapsed time counter

Hey guys, i like your script.
I need such a thing too! But have no idea how to modify the current one.

So heres what i need:

I cancelled smoking since 26.July.2015 / 08.30am.
I want to show up a counter that counts how much € i saved from this date.
Every day i spent €3.50 for one pack of cigarettes.

Now i would like to have a counter, that contiunuely counts money i saved since that date;
in a form like this: [url]http://www.worldometers.info/[/url]

so it should not begin at a AMOUNT i set, it should contiune since 26/july, like on the worldometers page.

that mean, the script need to count the days/time starting at 26/july, while 1 day = 3.50€ – everytime the page is loading.

ANNNND, i want to have it like, x.xxxxx€ so we can see some action here when i visit the website -> if i do x.xx€ i would see not much the whole day when the numbers are counting.
i want to see animation in the website ?

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@jedaisoulAug 05.2015 — Hi and welcome to the site. Please do not post your question in a thread that is only loosely related to your problem, particularly when the thread is six years old! I've moved your post to this new thread...
Copy linkTweet thisAlerts:
@wbportAug 05.2015 — Without doing your coding, this is what needs to happen: 1) Set the first date object to your July date and time. 2) A second date object is the current date/time. 3) Divide the difference between the two by the number of milliseconds in a day. 4) Multiply by 3.50. 5) Round to appropriate number of decimal points. 6) Display. One more, don't look here unless you are totally stumped. It is not your problem but it has some things you might need to use.
×

Success!

Help @ithurtswhenip spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...