« The XML family of specs | Main | Coq au Vin »

Prince 2K

PRINCE2.com Homepage.

Take a look at the date...

a few minutes later....

My bad! The date is fine on IE, but not on Mozilla. Here's the call:

<script language="javascript">document.write(getdate(DDMMYY));</script>

here's the script

var DDMMYY =0
var MMDDYY =1
function getdate(mode)
{
    var now = new Date();
    var dayNr = ((now.getDate()<10) ? "0" : "")+ now.getDate();
    if (mode==DDMMYY)
       var MonthDayYear 
=(dayNr+"/"+(now.getMonth()+1)+"/"+now.getYear());
    else
       var MonthDayYear 
=((now.getMonth()+1)+"/"+dayNr+"/"+now.getYear());
    return MonthDayYear;
}
function gettime()
{
    var now = new Date();
    var ampm = (now.getHours() >= 12) ? " P.M." : " A.M."
    var hours = now.getHours();
        hours = ((hours > 12) ? hours - 12 : hours);
    var minutes = ((now.getMinutes() < 10) ? ":0" : ":") + 
now.getMinutes();
    var seconds = ((now.getSeconds() < 10) ? ":0" : ":") + 
now.getSeconds();
    var TimeValue =(" " + hours + minutes + seconds + " "  + ampm);
    return TimeValue;
}

I guess it could have stood some testing :)


December 14, 2002 01:35 PM

Comments

Trackback Pings

TrackBack URL for this entry:
http://www.dehora.net/mt/mt-tb.cgi/840