Date to initialize it to some other point in the past or future.
var now = new VanaDate(); var oneHourFromNow = new Date(/*etc*/); var vanaTimeInAnHour = new VanaDate(oneHourFromNow);
VanaDate has the following properties:
Date and time
weekDay(0-7) Vana'diel weeks have eight days
weekDayName(string) Name of the day, i.e. "Earthsday"
time(integer) Raw number of Vana'diel seconds since midnight on 0001/01/01.
moonPercent(0-100) Percentage as shown on the in-game clock. 0 is New, 100 is Full.
moonPhaseName(string) Name of the moon phase.
Moon phase names
- 0: New Moon
- 1: Waxing Crescent
- 2: First Quarter Moon
- 3: Waxing Gibbous
- 4: Full Moon
- 5: Waning Gibbous
- 6: Last Quarter Moon
- 7: Waning Crescent
VanaDate) Returns the beginning of the Vana'diel day.
VanaDate) Adds a day. Takes an optional integer parameter to add more than one.
VanaDate) Subtracts a day. Takes an optional integer parameter to subtract more than one.
Shop class represents a guild shop with hours of operation and a weekly holiday. These include the nine crafting guilds plus the three Tenshodo shops. The
FFXI.shops contains singleton objects for each shop:
- tenshodoj (Jeuno)
- tenshodob (Bastok)
- tenshodon (Norg)
All of these methods act on the current Vana'diel time and take an optional
VanaTime parameter to get info on a different time instead.
VanaDate) The time the shop will next be open.
VanaDate) The time the shop will next close.
// Get info for the fishing guild shop var fishing = FFXI.shops.fishing; console.log(fishing.isOpen()); // true console.log(fishing.isOpen(tomorrow)); // false console.log(fishing.isHoliday(tomorrow)); // true var opensAfterHolidayAt = fishing.nextOpen(tomorrow);
Route represents a single leg of an airship or ferry trip. A route has three phases: Boarding, traveling, and inactive.
|-------------------|-----------------|---------------|------------ etc... (1) Boarding (2) Traveling (3) Inactive (1) Boarding
- The ship arrives at the dock and players can get on.
- The ship departs, leaving the dock.
- The ship arrives at its destination.
Even though each of the 3 nations has a single in-game airship traveling between it and Jeuno, it is defined as two separate routes: One for each direction of travel.
Note: I never bothered figuring out how many seconds airships spend in the boarding phase, so it's set to zero. Useful, eh?
FFXI.routes has the following trips defined:
These have identical schedules in both directions, so there's only one route for each path.
Shops, all of these methods act on the current Vana'diel time, and take an optional
VanaTime parameter which makes them act on that time instead.
VanaDate) When the next boarding phase (1) starts.
VanaDate) When the next traveling phase (2) starts.
VanaDate) The next boarding or traveling phase (1 or 2).
// What Earth time does the airship from Jeuno to Windurst leave? var leavesAt = FFXI.routes.jeunoToWindurst.nextDeparture(); console.log(leavesAt.earthDate.toString()); // Thu Feb 24 2011 15:29:25 GMT-0600 (Central Standard Time)