Polraudio 122 Report post Posted December 31, 2011 Is there a way i can check the current date the computer has and do something if the date is a certian date? EX: I want an event to appear on Holidays depending what holiday it is. Im also going to have quests that happen on certian days. I only need it to check Day, Month, and Time(time is optional). Thanks in advance :) Share this post Link to post Share on other sites
0 kellessdee 48 Report post Posted December 31, 2011 Yupperz :D Ruby comes with a `Time` class - current_time = Time.now # Get current time/date current_time.month # Get month as a number current_time.day # Get the day number current_time.hour # Get the current hour current_time.min # Get the current minute current_time.sec # Get the second current_time.yday # Get the day of the year current_time.wday # Get the day of the week If you want more info about the time class and it's methods: http://ruby-doc.org/core-1.9.3/Time.html Share this post Link to post Share on other sites
0 Polraudio 122 Report post Posted December 31, 2011 Thank you very much kell. :) Share this post Link to post Share on other sites
Is there a way i can check the current date the computer has and do something if the date is a certian date?
EX: I want an event to appear on Holidays depending what holiday it is. Im also going to have quests that happen on certian days.
I only need it to check Day, Month, and Time(time is optional).
Thanks in advance :)
Share this post
Link to post
Share on other sites