|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: New Countdown To Kickoff 2015 Website
I decided to use the milliseconds and convert it over with this code
Code:
var d = new Date(); var time_until = (kickoff_date - d.getTime()); var days = Math.floor(time_until/86400000); time_until = time_until%86400000 var hours = Math.floor(time_until/3600000); time_until = time_until%3600000 var minutes = Math.floor(time_until/60000); time_until = Math.floor(time_until%60000); var seconds = Math.floor(time_until/1000); var milliseconds = Math.floor(time_until%1000); |
|
#2
|
||||
|
||||
|
Re: New Countdown To Kickoff 2015 Website
Code:
var kickoff = new Date(2015, 0, 3, 10, 30, 0, 0) var diff = kickoff - new Date() var d = Math.floor(diff/1000.0/60.0/60.0/24.0) diff -= d * 1000 * 60 * 60 * 24 var h = Math.floor(diff/1000.0/60.0/60.0) diff -= h * 1000 * 60 * 60 var m = Math.floor(diff/1000.0/60.0) diff -= m * 1000 * 60 var s = Math.floor(diff/1000) dDiv.innerHTML = d hDiv.innerHTML = h mDiv.innerHTML = m sDiv.innerHTML = s document.title = d + " Days Until Kickoff" |
|
#3
|
||||
|
||||
|
Re: New Countdown To Kickoff 2015 Website
The %= is modulus equal. Its used to get the remainder of the division. I use it to get the leftover hours, minutes, ext. then use that for the next equation. Once you start using modulus its hard to stop
.Last edited by Team118Joseph : 26-10-2014 at 23:17. |
|
#4
|
||||
|
||||
|
Re: New Countdown To Kickoff 2015 Website
Of course, it's just interesting that we did the exact same calculation differently.
|
|
#5
|
||||
|
||||
|
Re: New Countdown To Kickoff 2015 Website
I was also wondering if anyone had some cool robot pictures I could use for the background. I was thinking of either having the page choose a random robot background or showing a robot of the day.
Last edited by Team118Joseph : 26-10-2014 at 23:41. |
|
#6
|
||||
|
||||
|
Re: New Countdown To Kickoff 2015 Website
Im not creating a link to this!
Everytime I see one of these, I cringe at how little days left we have before the 6 weeks of hell. ![]() |
|
#7
|
||||
|
||||
|
Re: New Countdown To Kickoff 2015 Website
Quote:
Could you make it reference CD media? I believe that's how The Blue Alliance gets photos (correct me if I'm wrong). Showing a daily random or predetermined lineup would be cool. |
|
#8
|
||||
|
||||
|
I got the slide show code in! Now I just need pictures!
![]() Just send pictures to Joseph.Foster118@gmail.com and I will put them into the slide show. Last edited by Team118Joseph : 27-10-2014 at 23:24. |
|
#9
|
||||
|
||||
|
Re: New Countdown To Kickoff 2015 Website
After I started this thread, new countdowns started popping up. Luckily competition is one of the many great things about FIRST.
|
|
#10
|
||||
|
||||
|
Re: New Countdown To Kickoff 2015 Website
I added a team display to show what team are in the photos. Go check out all the teams that are displayed!
|
|
#11
|
||||
|
||||
|
Re: New Countdown To Kickoff 2015 Website
Less than 50 days left! Thanks to everyone who submitted photos and please keep sending them in!
Last edited by Team118Joseph : 14-11-2014 at 12:26. |
|
#12
|
|||
|
|||
|
Re: New Countdown To Kickoff 2015 Website
Does anyone else have this error?
|
|
#13
|
||||
|
||||
|
Re: New Countdown To Kickoff 2015 Website
It seems to be a browser issue. I get the same error in Firefox. The site runs best in explorer but will also work in chrome.
Last edited by Team118Joseph : 14-11-2014 at 15:12. |
|
#14
|
||||
|
||||
|
Re: New Countdown To Kickoff 2015 Website
Nice updates to the site -- I use chrome and I haven't had any problems so far
![]() |
|
#15
|
||||
|
||||
|
I have created a form for uploading photos for the slideshow. Just click the here button in the footer and upload the photo. This should be easier than emailing the photos to me.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|