VanaTime 1.1.0 README
This document was last updated on Thu Aug 30 22:58:05 EDT 2007.
Introduction to VanaTime
VanaTime is a group of classes that deal with times, days, and moon phases in the MMORPG Final Fantasy Online (aka FFXI). Besides translating earth time to game time, you can also convert game time to real time, step forward a day, get a time estimate about how long you have left until the next optimal moon phase, and a few other useful features.
VanaTime is a work in progress and the API may change from time to time… you may want to use explicit versioning in any code depending on it.
* new(Time) accepts a Time object to initialize a new VanaTime, using the current time if no Time object is passed * now an alias for new as a convenience method * at(VanaTime) accepts a VanaTime object, int, or float representing vana time to initialize a new VanaTime object * earth_time=(Time) allows re-initializing a VanaTime object with a new earth time * vana_time=(VanaTime) allows re-initializing a VanaTime object with a new vana time, given as a VanaTime object (why not >_>), or (more useful) an int or float * to_i returns an integer with the internal representation of vana time * to_f returns a float with the internal representation of vana time without losing any accuracy * year * month * date * hour * minute * second these methods return various times, what we're interested in * to_s returns a string in the format: YYYY-MM-DD hh:mm:ss * day returns a VanaDay object initialized with the current VanaTime * moon returns a VanaMoon object initialized with the current time
* new(VanaTime) accepts a VanaTime object used to initialize the vana day, using a new VanaTime initialized to the current time if one isn't passed * vana_time=(VanaTime) used to reinitialize the vana day object with a new time * to_i returns a base zero number representing the day of the week * to_s returns the name of the day of the week * weak_element returns the element that the current day is weak to * day_start returns a VanaTime object representing the start of the current day * tomorrow returns a VanaTime object representing the start of the next vana day
* new(Time) Unlike VanaDay, VanaMoon is initialized with the current earth time * to_i returns a number representing the exact position along the progression of moon phases * percent returns the absolute value of the percentage formatted * phase returns the name of the current moon phase * to_s returns a string in the format: moon_percent.abs phase_name * to_next_array returns an array containing the days, hours, minutes, and seconds until the next moon phase * to_next returns a formatted countdown until the next moon phase * next_phase returns the name of the next moon phase * to_optimal_array returns an array containing the days, hours, minutes, and seconds until the next optimal moon phase * to_optimal returns a formatted countdown until the next optimal moon phase * optimal_phase returns the name of the next optimal moon phase