Finding dates in javascript!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • livid86
    New Member
    • Nov 2008
    • 8

    Finding dates in javascript!

    Hey guys,

    I am a little stuck. What i need to do is write a script that will find four things.

    - This week
    - Last Week
    - This month
    - Last Month

    What i want it to do is the user can select from a combo box either of the options and it will fill it out a textbox in dd/mm/yy format.

    With the week's i don't just need to subtract 7 or 14 from the date i need it to be from monday-sunday. So if it was a wednesday and the date was the 29/12/08 and the user selected this week. It would return 29/12/08 and 29/12/08.

    I know this is a big ask but i'm desperate.

    Thanks Guys
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    probably the Date object is the right one for you to use. see Date – MDC

    regards

    Comment

    • livid86
      New Member
      • Nov 2008
      • 8

      #3
      Thanks

      Thanks mate,

      This is exactly what i was looking for!

      Thanks again

      Comment

      Working...