# Senocular: countdown

**URL:** <https://forum.kirupa.com/t/senocular-countdown/42615>\
**Category:** Uncategorized\
**Created:** [February 11, 2004, 3:08am UTC](https://forum.kirupa.com/t/senocular-countdown/42615 "2004-02-11T03:08:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dudeman](https://avatars.discourse-cdn.com/v4/letter/d/35a633/32.png) [@dudeman](https://forum.kirupa.com/u/dudeman)\
**Post date:** [February 11, 2004, 3:08am UTC](https://forum.kirupa.com/t/senocular-countdown/42615/1 "2004-02-11T03:08:25Z")

</div>

Hey… I want to add years. I had no problem adding years to the basic script that was similiar to this I found on flashkit. What am I doing wrong here?

```auto

	this.secs = Math.floor(this.msecs/1000); // 1000 milliseconds make a second
	this.mins = Math.floor(this.secs/60); // 60 seconds make a minute
	this.hours = Math.floor(this.mins/60); // 60 minutes make a hour
	this.days = Math.floor(this.hours/24); // 24 hours make a second
**this.years = Math.floor(this.days/365.242199); // 365 days make a year**

	this.msecs = string(this.msecs % 1000);
	this.secs = string(this.secs % 60);
	this.mins = string(this.mins % 60);
	this.hours = string(this.hours % 24);
	this.days = string(this.days);
**this.years = string(this.years);**

	while (this.msecs.length < 3) this.msecs = "0" + this.msecs;
	if (this.secs.length < 2) this.secs = "0" + this.secs;
	if (this.mins.length < 2) this.mins = "0" + this.mins;
	if (this.hours.length < 2) this.hours = "0" + this.hours;
	while (this.days.length < 3) this.days = "0" + this.days;
**if (this.years.length < 1) this.years = "0" + this.years;**

```

As you can see, bold is what I added

p.s. “this.days = Math.floor(this.hours/24); // 24 hours make a second”

Did you mean make a day? hehe

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 11, 2004, 3:46am UTC](https://forum.kirupa.com/t/senocular-countdown/42615/2 "2004-02-11T03:46:46Z")

</div>

HAH!

What a fool am I… I had the date set on thisyear(2004), thats why years kept showing up as zero… o’well 🙂
