Announcement

Collapse
No announcement yet.

Date in Status Bar...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Date in Status Bar...

    I'd like to put the date in this format: 22/07/02 - 00:18

    It's European format, and a 24 hour clock after it...how is this possible?

  • #2
    Here:
    PHP Code:
    <script type="text/javascript">
    <!--
    function 
    makeArray() {
        for (
    0i<makeArray.arguments.lengthi++)
            
    this[1] = makeArray.arguments[i];
    }

    function 
    makeArray0() {
        for (
    0i<makeArray0.arguments.lengthi++)
            
    this[i] = makeArray0.arguments[i];
    }

    function 
    y2k(number) {
        return (
    number 1000) ? number 1900 number;
    }

    var 
    months = new makeArray('01','02','03','04','05','06','07','08','09','10','11','12');
    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());
    var 
    time_h today.getHours();
    var 
    time_m today.getMinutes();

    window.status date+'/'+months[month]+'/'+year+' - '+time_h+':'+time_m;
    //-->
    </script
    Only thing is, the clock isn't realtime...

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...
    X