You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
2 years ago | |
|---|---|---|
| .. | ||
| LICENSE | 3 years ago | |
| LibTime-1.0.lua | 2 years ago | |
| LibTime-1.0.toc | 2 years ago | |
| LibTime-1.0.xml | 3 years ago | |
| README.md | 3 years ago | |
README.md
LibTime-1.0 (WoW AddOn Library)
Description
A little library around date, time and GetGameTime and more...
To use in addons
lib = LibStub("LibTime-1.0")
API
GetGameTime
This library detecting the seconds of server time. The fourth return value is a boolean to signalize sycronization. It needs min. a minute to get sync from login.
hours, minutes, seconds, secondsSynced = lib.GetGameTime( )
GetLocalTime
hours, minutes, seconds = lib.GetLocalTime( )
GetUTCTime
GetUTCTime( [<inSeconds>] )
Example:
hours, minutes, seconds = lib.GetUTCTime( )
seconds = lib.GetUTCTime(true) -- seconds since 1.1.1970 0:00
Arguments: inSeconds - (optional) boolean
Return values: hours - integer minutes - integer seconds - integer
GetCountryTime
GetCountryTime( <countryId>[, <inSeconds> ] )
Examples:
hours, minutes, seconds, countryName = lib.GetCountryTime( 98 )
seconds = lib.GetCountryTime(17,true)
GetTimeString
GetTimeString("GameTime|LocalTime|UTCTime|CountryTime"[, b24Hours[, displaySeconds[, countryId]]])
Examples:
"00:00" = lib.GetTimeString("GameTime",true)
"00:00:00" = lib.GetTimeString("LocalTime",true,true)
"00:00:00 AM" = lib.GetTimeString("UTCTime",false,true)
"00:00 PM" = lib.GetTimeString("CountryTime",false,false,23)
iterateCountryList
for id, name in lib.iterateCountryList() do
end
My other projects
Disclaimer
World of Warcraft© and Blizzard Entertainment© are all trademarks or registered trademarks of Blizzard Entertainment in the United States and/or other countries. These terms and all related materials, logos, and images are copyright © Blizzard Entertainment.