More Date Functions please

Feature requests for future versions can be voiced here
Post Reply
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

More Date Functions please

Post by djrikki » Mon Oct 31, 2011 3:38 am

Hi Andreas,

I would like to be able to give any date in the dd-mm-yyyy (or whatever you choose) and return the Day of the Week.

E.g.

firstofthemonth = GetDay(01-10-2011)
result: Saturday

or

endofthemonth = GetDay(31-10-2011)
result: Monday

---

As good as the Date functions are you cannot do a great deal more, I'd love to be to do this as well:

tomorrow = GetDateNum(#DATEDAY,1)
result: 1 (the day after tommorow)

Or

yesterday = GetDateNum(#DATEDAY,-1)
result: 30 (the day before today)

Same goes for the other GetDateNum() constants:

e.g.

nextmonth = GetDateNum(#DATEMONTH),1)
result: 11 (the next month)

----

Or even....

noofdaysinthismonth = GetDays()
result: 31

And finally..

weekno = GetWeek()
result: 44 (final week of november)

Thanks :D
Last edited by djrikki on Mon Oct 31, 2011 3:58 am, edited 1 time in total.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com

djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: More Date Functions please

Post by djrikki » Mon Oct 31, 2011 3:56 am

At the end of the day I want to be able to print/draw something like this to the screen, and at the moment it seems impossible to do due to the lack of Date() functions.

If there is a solution already I'd be very happy if you could supply it, but *scratching my head* I cannot find one.

October 2011:

Code: Select all

      Mo Tu We Th Fr Sa Su
39                    1  2
40    3   4  5  6  7  8  9
41   10  11 12 13 14 15 16
42   17  18 19 20 21 22 23
43   24  25 26 27 28 29 30
44   31

And highlight the number which represents today in bold.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com

djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: More Date Functions please

Post by djrikki » Mon Oct 31, 2011 5:15 pm

Hey Andreas,

Never mind the suggestion for a suitable solution, I did come with a solution today, however more Date functions would be useful and would have made my life easier. :lol:

http://www.flickr.com/photos/61283734@N03/6298706687/
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com

User avatar
airsoftsoftwair
Posts: 3075
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: More Date Functions please

Post by airsoftsoftwair » Tue Nov 01, 2011 3:11 pm

Just use Google and you should find a lot of algorithms for doing all sorts of date calculations :)

Post Reply