Date Script / Code

M

Mike

Is there anything out there that can read in the current
date and return the date range for the week or the month.

Example:

Week Today's Date: 1/6/2004
Returns: Beginging 1/5/2004
End 1/11/2004

Month Today's Date: 1/6/2004
Returns: Beginging 1/1/2004
End 1/31/2004

Thanks,

Mikeal
 
D

Dwayne Conyers

Mike said:
Is there anything out there that can read in the current
date and return the date range for the week or the month.


Your JS code could check for the day of the week and then count backwards to
Sunday and forwards to Saturday. For month, the first day is always "1" and
you will need to calculate the last day of what month it is (taking into
consideration leap years).

Hope that helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top