dcsimg
www.webdeveloper.com

Search:

Type: Posts; User: Juuitchan

Page 1 of 20 1 2 3 4

Search: Search took 0.02 seconds.

  1. Simple. Just grab today's date and stick it in. ...

    Simple. Just grab today's date and stick it in.



    var curdate=new Date(); // gets today's date
    var cdnum=dayofyear(curdate);
    document.write('Today is day number '+cdnum+' of the current...
  2. Rianna, JavaScript allows you to create your...

    Rianna,

    JavaScript allows you to create your own functions. I strongly suggest you read up on this.

    The first piece of code I gave you was a function I wrote. It contains code which tells your...
  3. The usage of my function is as follows: ...

    The usage of my function is as follows:



    var a=new Date("July 1, 2007");
    var b=dayofyear(a);
    alert(b);


    If my math is correct, and if the function is correct, this will give you the...
  4. I believe that no such function exists. And...

    I believe that no such function exists.

    And Gil forgot about daylight saving time. His code contains a subtle bug that Rianna might well have not noticed.

    Let me see what I can do:


    ...
  5. Replies
    3
    Views
    777

    If you want more info, go to: www.php.net

    If you want more info, go to: www.php.net
  6. Replies
    3
    Views
    777

    Use PHP instead of JavaScript. This will give...

    Use PHP instead of JavaScript.

    This will give you the current month:

    <?php echo date("F") ?>

    This will (unless I'm mistaken) give you what you seem to want:

    <?php echo "<a...
  7. Thread: Date

    by Juuitchan
    Replies
    6
    Views
    752

    What's the point of that?! You are effectively...

    What's the point of that?! You are effectively using the user's watch to tell him the time!
  8. Thread: Date Help

    by Juuitchan
    Replies
    17
    Views
    2,448

    Is this homework?

    Is this homework?
  9. Replies
    11
    Views
    1,633

    Try looking into PHP.

    Try looking into PHP.
  10. Replies
    11
    Views
    1,633

    Why aren't you using server-side for this?! ...

    Why aren't you using server-side for this?!

    Don't you know that you should use JavaScript pretty much only when forced to?
  11. Thread: Age from Dob

    by Juuitchan
    Replies
    11
    Views
    1,339

    Interpreters are heartless. They don't care that...

    Interpreters are heartless. They don't care that it's "just a typo".
  12. The function gmdate() is just like date(), except...

    The function gmdate() is just like date(), except that it always gives you Greenwich Mean Time.

    The way I see it is, to solve your problem I would do this:
    - Get the current time using time().
    -...
  13. Replies
    17
    Views
    2,430

    That'll give you a string, Chuck.

    That'll give you a string, Chuck.
  14. Thread: Age from Dob

    by Juuitchan
    Replies
    11
    Views
    1,339

    NogDog's code: $age = ($nowMo > $dobMo or...

    NogDog's code:



    $age = ($nowMo > $dobMo or ($nowMo = $dobMo and $nowDay >= $dobDay)) ?
    $nowYr - $dobYr : $nowYr - $dobYr - 1;


    Please examine this part:
  15. Replies
    17
    Views
    2,430

    Amir, throw that book away. Now do as I say,...

    Amir, throw that book away.

    Now do as I say, Amir. Right after your line
    thisYear = today.getYear()

    put this:
    document.write("<br>The variable thisYear now equals: "+thisYear+"<br>");
  16. Replies
    17
    Views
    2,430

    Amir: 1) Why are you using leading zeros?...

    Amir:

    1) Why are you using leading zeros? Leading zeros means octal.

    2) What does getYear do?

    3) No server-side anything is LAME.
  17. Replies
    16
    Views
    3,137

    mm=mm

    mm=mm<10?'0'+(mm+1):mm+1;

    Oy vey.
  18. Replies
    718
    Views
    113,228

    The former, as I prefer depth to breadth. ...

    The former, as I prefer depth to breadth.

    Physical abuse or psychological abuse?
  19. Replies
    16
    Views
    3,137

    Please refresh the file in your browser, cardona,...

    Please refresh the file in your browser, cardona, and then try again.

    If it refuses to refresh, try using a browser other than Internet Explorer.

    Also, cardona, consider modifying the code to...
  20. Replies
    16
    Views
    3,137

    // Change this var mm=nextDay.getMonth(); // to...

    // Change this
    var mm=nextDay.getMonth();
    // to this
    var mm=nextDay.getMonth()+1;
    // and see if that works.
  21. Replies
    16
    Views
    3,137

    Leave txtDate1 out of the names array, then.

    Leave txtDate1 out of the names array, then.
  22. Replies
    10
    Views
    1,101

    The "value" of a textbox is a string, not a...

    The "value" of a textbox is a string, not a number.

    How about changing this


    document.getElementById('counter').value++;

    to this?
  23. Thread: Date problem

    by Juuitchan
    Replies
    6
    Views
    694

    You forgot about the weird month numbering. ...

    You forgot about the weird month numbering.

    When using new Date(year, month, day), the month uses funny numbering: January = 0, February = 1, etc. So you will have to allow for this.
  24. Replies
    6
    Views
    868

    I doubt it, Chuck. We should do a survey to...

    I doubt it, Chuck.

    We should do a survey to see who's right, though. Hey, Kor!
  25. Replies
    26
    Views
    3,259

    It is a huge problem, Rterres. Why did you not...

    It is a huge problem, Rterres.

    Why did you not tell us exactly what it was you were trying to do?

    You said that you wanted a conversion, but you did not say what you were converting from.

    My...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4
HTML5 Development Center



Recent Articles