event

00 00 00 00
DAYS HOURS MINUTES SECONDS

date

Please note that custom code added to the project is beyond of the scope of Readymag support. Bend matter carefully. You might want to learn more about the limitations of the Code Injection feature here: http://help.readymag.com/code-injection/ \ oo \____|\mm //_//\ \_\ /K-9/ \/_/ /___/_____\ ----------- -->
(function() { 'use strict'; /* jshint browser: true */ /**********************These are the editable values***********************************/ var yr=2017; /* year value */ var mo=7; /* month value */ var da=6; /* day value */ var hr=0; /* hours value */ var mn=0; /* minutes value */ var sc=0; /* seconds value */ var ltr='One year ahead'; /* heading text for event*/ var msg='Are you still here?'; /* heading text for event date reached */ var afr='The event has passed'; /* heading text for after event */ /*************************************************************************************/ var obj,el,now,nwy,nwm,nwd,nwh,nwmn,nws,nwstr,ltrstr,dd,ddy,dhr,dmn,dsc,si; var d=document; var mos=['January','February','March','April','May','June','July','August','September','October','November','December']; var dys=(60*60*1000*24); var hrs=(60*60*1000); var mns=(60*1000); function countdown(){ obj=d.getElementById('wrapper'); el=d.getElementById('event'); el.firstChild.nodeValue=ltr; d.getElementById('date').firstChild.nodeValue=mos[mo-1]+' '+da+', '+yr; now=new Date(); nwy=now.getUTCFullYear(); nwm=now.getMonth(); nwd=now.getDate(); nwh=now.getHours(); nwmn=now.getMinutes(); nws=now.getSeconds(); nwstr=mos[nwm]+' '+nwd+', '+nwy+' '+nwh+':'+nwmn+':'+nws; ltrstr=mos[mo-1]+' '+da+', '+yr+' '+hr+':'+mn+':'+sc; dd=Date.parse(ltrstr)-Date.parse(nwstr); ddy=Math.floor(dd/dys*1); dhr=Math.floor((dd%dys)/hrs*1); dmn=Math.floor(((dd%dys)%hrs)/mns*1); dsc=Math.floor((((dd%dys)%hrs)%mns)/1000*1); if((ddy<=0)&&(dhr<=0)&&(dmn<=0)&&(dsc<=1)&&(nws