LibDateTime provide locale date and time, formatting function, clock callback and more DateTime functions. This library is localized in English, French, German, Spanish and Italian.
This library can be include in another addon.
Documentation
DateTime type :
This is a table with following format and support
{
year = 2008,
month = 9,
day = 12,
hour = 12,
minute = 0,
second = 0
}
LibDateTime:New(year, month, day, hour, minute, second)
Returns a DateTime table.
- year: a number (default: 1970)
- month: a number (default: 1)
- day: a number (default: 1)
- hour: a number (default: 0)
- minute: a number (default: 0)
- second: a number (default: 0)
LibDateTime:Now()
Returns current DateTime.
LibDateTime:GameStartedSince()
Returns the number of seconds since the game begin.
LibDateTime:IsLeapYear(year)
Return true if year is a leap year.
LibDateTime:YearDay(datetime)
Returns a number representing the day of the year (1..366).
- datetime: a DateTime table
LibDateTime:WeekDay(datetime)
Returns week day number (1..7 => Mon..Sun).
- datetime: a DateTime table
LibDateTime:Format(datetime, format)
Returns formatted DateTime.
- datetime: a DateTime table
- format: a format string
- Code to use in format string:
- %a - The abbreviated weekday name (``Sun)
- %A - The full weekday name (``Sunday)
- %b - The abbreviated month name (``Jan)
- %B - The full month name (``January)
- %d - Day of the month (01..31)
- %H - Hour of the day, 24-hour clock (00..23)
- %I - Hour of the day, 12-hour clock (01..12)
- %j - Day of the year (001..366)
- %m - Month of the year (01..12)
- %M - Minute of the hour (00..59)
- %p - Meridian indicator (``AM or ``PM)
- %S - Second of the minute (00..60)
- %w - Day of the week (Sunday is 0, 0..6)
- %y - Year without a century (00..99)
- %Y - Year with century
- %% - Literal ``% character
LibDateTime.Format(datetime, "%d/%m/%Y %H:%M:%S") => "12/09/2008 12:00:00"
LibDateTime.Format(datetime, "%Y-%m-%d %H:%M:%S") => "2008-09-19 12:00:00"
LibDateTime:DateTime2UnixTime(datetime)
Convert a `DateTime' to unix time.
- datetime: a DateTime table
LibDateTime:RegisterClock(callback)
Register a clock function to call every second when DateTime is updated. Return handle string if successful registered, or false if not. The callback method receive a DateTime table in argument.
- callback: is a function or a string (function name)
LibDateTime.RegisterClock(MyMod.MyClockFunction)
LibDateTime.RegisterClock("MyMod.MyClockFunction")
LibDateTime:UnRegisterClock(handle)
Unregister the clock responding to handle string (returned by LibDateTime.RegisterClock).
handle: a handle string
LibDateTime:IsInitialized()
Returns true if LibDateTime is initialized
tag release-0.4.7
8a75d4f43014f1bfa2cf46c1c1437af7db2489c0
Cameron Kenneth Knight <ckknight@gmail.com>
2008-11-19 00:11:28 +0000
Tagging as release-0.4.7
--------------------
Yann Lugrin (3):
554f7a0: translatiomn encoding
5d1c142: Remove Clock folder from package
0b56ad3: prepare release
Installation Guide
- Exit "Warhammer Online" completely
- Download the mod you want to install
- Make a folder on your desktop called "My Mods"
- Save the .zip/.rar files to this folder.
- If, when you try to download the file, it automatically "opens" it... you need to RIGHT click on the link and "save as..." or "Save Target As".
- Extract the file - commonly known as 'unzipping'
Do this ONE FILE AT A TIME!
- Windows
- Windows XP has a built in ZIP extractor. Double click on the file to open it, inside should be the file or folders needed. Copy these outside to the "My Mods" folder.
- WinRAR: Right click the file, select "Extract Here"
- WinZip: You MUST make sure the option to "Use Folder Names" is CHECKED or it will just extract the files and not make the proper folders how the Authors designed
- Verify your WAR Installation Path
That is where you are running WAR from and THAT is where you need to install your mods.
- Move to the Addon folder
- Open your Warhammer Online folder. (default is C:\Program Files\Warhammer Online\)
- Go into the "Interface" folder.
- Go into the "AddOns" folder.
- In a new window, open the "My Mods" folder.
- The "My Mods" folder should have the "Addonname" folder in it.
- Move the "Addonname" folder into the "AddOns" folder
- Start Warhammer Online
Translations
When you download a mod, please be sure that the mod is compatible with your translation of WAR. Some mods only work on the US versions, while some only work on some of the various European versions. These variations are called "Localizations".
Directory Structure
Warhammer Online
|_ Interface
|_AddOns
|_*AddonName*
|_ *AddonName*.mod
|_ *AddonName*.lua
|_ (possibly others as well)...