Today's Date: Anywhere you want!
This modification is in the archives.
Plugin today's date anywhere in the system. Just place the following JAVASCRIPT in the HTML Code.
HTML Code:
<script language="JavaScript"> <!-- function makeArray() { for (i = 0; i<makeArray.arguments.length; i++) this[i + 1] = makeArray.arguments[i]; } function makeArray0() { for (i = 0; i<makeArray0.arguments.length; i++) this[i] = makeArray0.arguments[i]; } function y2k(number) { return (number < 1000) ? number + 1900 : number; } var months = new makeArray('January','February','March','April','May','June','July','August','September','October','November','December'); var days = new makeArray0('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'); var today = new Date(); var day = days[today.getDay()]; var date = today.getDate(); var month = today.getMonth() + 1; var year = y2k(today.getYear()); //--> </script> Spoiler (click to open)
Wouldn't a plugin using php's
Code:
date(); then set that to a variable and insert it wherever you want. EDIT: this is for jilly - as requested in PM: (don't mean to be rude and steal your thread, so please let me know if you want me to move this post.) Install this plugin and insert Code:
$today You can change the display of the date and time by editing the plugin: Code:
$today = date("F j, Y, g:i a"); // March 10, 2001, 5:16 pm $today = date("m.d.y"); // 03.10.01 $today = date("j, n, Y"); // 10, 3, 2001 $today = date("Ymd"); // 20010310 $today = date('\i\t \i\s \t\h\e jS \d\a\y.'); // It is the 10th day. $today = date("D M j G:i:s T Y"); // Sat Mar 10 15:16:08 MST 2001 $today = date("H:i:s"); // 17:16:17 Close
Note: Java taken from freeservers site. I take NO Credit once so ever, it's just instructions. Download No files for download. |
Similar Mods
Add Today's Date | vBulletin 2.x Full Releases |