Displaying a calendar?

Monkey Forums/Monkey Beginners/Displaying a calendar?

malick(Posted 2014) [#1]
Does anyone know of any modules or sample code that would help with displaying a calendar (preferably platform independent)? I'd like to be able to display a calendar showing a month, similar to what you see when you look at the calendar on your smartphone, Google calendar, etc. I've tried searching the Forums but didn't find much of anything. Thanks!


ziggy(Posted 2014) [#2]
I think you'll have to do it yourself.


Goodlookinguy(Posted 2014) [#3]
I've written code that can give you the information you'll need to be able to write a calendar, but I haven't made a graphical interface for it.

I think it has some dependencies on other bits of my code, so I could attempt to rip it out if you really need it - take a look: https://bitbucket.org/Goodlookinguy/xaddon/src/8040b2c/mojoplus/datetimefuncs.monkey


malick(Posted 2014) [#4]
@Goodlookinguy - That's fantastic! I'm going to try messing with it tonight. That looks like it will have me well on my way. :)


Goodlookinguy(Posted 2014) [#5]
Here, I ripped the code out. It didn't have that many dependencies on my other stuff.




Goodlookinguy(Posted 2014) [#6]
I just changed the above code box and added in a real calender example (+1 minor bug fix). It can be done fairly easily with my code.


malick(Posted 2014) [#7]
That's perfect. Thank you so much! Would you have any objection to me posting any tweaks I make back here as a module or something?


Goodlookinguy(Posted 2014) [#8]
Do as you like. The code in my framework/library/whatever is under the WTFPL.

Edit: I should mention that there are probably bugs in the DateTime code. So if you run across any that I haven't reported myself or fixed please report it to my repository bug tracker.


Goodlookinguy(Posted 2014) [#9]
I just fixed the DayOfYear function in case you were using it.

There were a couple of kinks/bugs in the system that I believe have all been resolved now.