|
#2
|
||||
|
||||
|
Not that easily:
I haven't needed to come up with a method myself but over at proto there's a list of helpful things to at least get you started: http://proto.layer51.com/l.aspx?p=9 ...and remember, always useful: 86400000 milliseconds in a DAY (useful for stuff like this: Actionscript:
/*****************************************************************************
** This is a very simple function that will give you a date object for ANY
** day offset from current date (or from any other date object).
** e.g. newDateObject = oldDateObject.getDateOffset(-5);
** offset is in Days (1 = Tomrw, -1 = Yesterday)
********************************************************************************/
Date.prototype.getDateOffset = function(offset)
{
var retDate = new Date(this);
retDate.setTime(retDate.getTime()+offset*86400000); // 86400000 represents a number of milliseconds each day haves
return retDate;
}Rich )
__________________
Blog: http://www.richardleggett.co.uk | If your happy with the help, let us know about it
|
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Converting dates for use with new Date Object | PUP100 | Flash MX ActionScript |
5 | 07-30-2003 11:21 AM |
| How do I get Flash to compare to Varibles that are strings | flashgirl | Flash 5 Actionscript |
5 | 10-15-2001 03:26 PM |
| Urgent: How to compare strings | Cecil | General Flash | 4 | 11-30-2000 07:36 AM |
All times are GMT. The time now is 10:06 PM.




TODAY'S POSTS




