Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

if...else statement... help needed

Kaya254Kaya254 Member Posts: 2
hi there,

Im devoloping my first Paid website for my step dad and he would like a clock displayed in gmt ( which i have already) , and when the gmt time is before 9:30 am and after 6pm he would like the words " office closed" , is it possible to do it with javascript? i have a basic understanding of java

Any help appreciated

Kaya

Comments

  • mac_doggiemac_doggie Member Posts: 488
    : hi there,
    :
    : Im devoloping my first Paid website for my step dad and he would like a clock displayed in gmt ( which i have already) , and when the gmt time is before 9:30 am and after 6pm he would like the words " office closed" , is it possible to do it with javascript? i have a basic understanding of java
    :
    : Any help appreciated
    :
    : Kaya
    :

    It's something Like this:
    [code]
    dt = new Date();
    if((dt.getUTCHours() > 9) && (dt.getUTCHours() < 17)) {
    document.write('The office is closed right now');
    }else {
    document.write('We're open, so come on over...');
    }

    [/code]

    You can alter the time yourself I guess...

    good luck
    ;-)
    -mac-
    mailto:[email protected]
    the Netherlands...


Sign In or Register to comment.