SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2003
    Location
    somewhere over the rainbow
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question jscript that displays only month year

    ............................................................................
    Most of Jscripts Ive found are complete calendars or show
    date month year hour ;

    I only need a script to display : month year
    by the order ;

    Any hint ?

    Cheers

    RW


    ............................................................................

  2. #2
    SitePoint Enthusiast
    Join Date
    Nov 2002
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    months = ["January","February","March","April","May","June","July","August","September","October","November","December"];
    now = new Date();
    month = months[now.getMonth()];
    year = now.getFullYear();
    document.write(month+" "+year);
    travis


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •