View Full Version : how to display current date several places on page
drumsicle
04-13-2002, 05:25 AM
Is there a piece of code that i can put in the head tags that will allow me to call up the current date in this format: 4/13 and use it on several places.<br /><br />for example, headings on a tgp like <br /><br />4/13 Teens 4/13 Hardcore etc.<br /><br />Thanks. <img border="0" title="" alt="[Smile]" src="smile.gif" />
SexySites
04-13-2002, 06:27 AM
in javascript you mean?<br /><br />laters,<br />Chris
<a href="http://httpd.apache.org/docs/howto/ssi.html#today'sdate" target="_blank">http://httpd.apache.org/docs/howto/ssi.html#today'sdate</a>
drumsicle
04-13-2002, 09:09 AM
</font><blockquote><font size="1" face="Verdana, Arial">quote:</font><hr /><font size="2" face="Verdana, Arial">Originally posted by SexySites:<br /><strong>in javascript you mean?<br /><br />laters,<br />Chris</strong></font><hr /></blockquote><font size="2" face="Verdana, Arial">Yes! I've seen it before on tgps, where there is a javascript in the head tag and then you just need one short line such as document.write-something-or-other wherever you want to display the date.
viper2K1
04-13-2002, 09:39 AM
put this between script and /script tags (i hope it will show ok <img border="0" title="" alt="[Confused]" src="confused.gif" /> <br /></font><blockquote><font size="1" face="Verdana, Arial">code:</font><hr /><pre style="font-size:x-small; font-family: fixed;">function date1()<br />{<br />var today = new Date();<br />var month = today.getMonth()+1;<br />var day = today.getDate();<br />document.write('<font face="verdana,helvetica" color="red" size="2"><b>'+month+'/'+day+'</b></font>');<br />}</pre><hr /></blockquote><font size="2" face="Verdana, Arial">everywhere you want your date on your page put date1() (between script and /script)
drumsicle
04-14-2002, 08:41 AM
nice! thanks viper2k1 <img border="0" title="" alt="[Smile]" src="smile.gif" />
vBulletin® v3.7.3, Copyright ©2000-2012, Jelsoft Enterprises Ltd.