AddTimeToDate(date, #TIMEUNIT, amount) to Hollywood Time-commands
Posted: Tue May 10, 2022 8:32 am
Hollywoods own Time system is quite handy that you have these MakeDate() and ParseDate().
However, there is one oversight still. For example right Now I am using this Date as the tables ID:
table[date1]
table[date2]...
Difficulty is that when I want to go through this list in some sort of FOR-NEXT kind of loop, it is difficult to find out the next date.
It is easy if it happens to be like:
01-01-2001, since in that case it is simply day=day+1.
But what if date is 30, and I do +1, now I have to figure out which month it is to see if month should change or not, or even worse, if day is 28 and it is February, then I have to even figure out what year it is.
It is not anything that would be undoable, but it would be handy if there would be some command already in Hollywood where I could do something like:
And this way 45 days would be added to the date1, and its result would be returned.
However, there is one oversight still. For example right Now I am using this Date as the tables ID:
table[date1]
table[date2]...
Difficulty is that when I want to go through this list in some sort of FOR-NEXT kind of loop, it is difficult to find out the next date.
It is easy if it happens to be like:
01-01-2001, since in that case it is simply day=day+1.
But what if date is 30, and I do +1, now I have to figure out which month it is to see if month should change or not, or even worse, if day is 28 and it is February, then I have to even figure out what year it is.
It is not anything that would be undoable, but it would be handy if there would be some command already in Hollywood where I could do something like:
Code: Select all
NewDate = AddTimeToDate(date1, #DAY, 45)