Quantcast
Download
(19 Kb)
Download
Updated: 12/12/21 07:40 AM
Compatibility:
Deadlands (7.2.5)
Updated:12/12/21 07:40 AM
Created:02/14/20 12:53 PM
Monthly downloads:4,357
Total downloads:88,758
Favorites:71
MD5:
7.2.5
LibClockTST  Popular! (More than 5000 hits)
Version: 1.0.1
by: Tyx, Phinix
LibClock
Tamriel Standard Time
by @Tyx


This is a new library that allows you to subscribe to in-game time, date, and moon phase updates, or get the current time, date, or moon phase directly. You can also retrieve the data for a specific date.

The library is a product of my recent efforts to update my addon Clock - Tamriel Standard Time. I had to completely rewrite it, it hasn't aged very well, and separated the logic from the UI. This is the logical part.


Feel free to create your own user interface based on this library without worrying about the mathematics of calculating time, date and moon phase. Or download the new UI part of Clock - Tamriel Standard Time.


If you like, you can try it out and leave me a feedback in the comments or at GitHub. Especially, if you found a bug.
Version 1.0.1: (Phinix)
- Modified LibClockTST.GetWeekDay function to derive day-of-week value using unix epoch timestamps as the previous method was off by 1 for December 2021 and probably other dates.
- Updated API version for Deadlands.
- EDIT: Update without version change (12-11-21) to fix logic error/typo.

Version 1.0.0:
- Initial release.
- API bump for Waking Flame update without version change (Phinix)
- Changed addon Minor version to 1 and changed ## AddOnVersion to 1 in the manifest to match. (Thanks for the heads-up Baertram!)
Optional Files (0)


Archived Files (3)
File Name
Version
Size
Uploader
Date
1.0.0
18kB
Phinix
08/23/21 08:13 AM
1.0.0
19kB
Tyx
02/21/20 07:13 AM
1.0.0-beta1
18kB
02/14/20 12:53 PM


Post A Reply Comment Options
Unread 12/19/21, 07:08 AM  
Shadowshire

Forum posts: 1
File comments: 390
Uploads: 0
Arrow LibClockTST 1.0.1

Unfortunately, the following UI Error was displayed on the HUD after my character was loaded to play:

Code:
user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:312: attempt to index a nil value

stack traceback:

user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:312: in function 'Time:CreateDateReplacements'
|caaaaaa<Locals> self = [table:1]{sizeHasUpdated = T}, loreDate = [table:2]{year = 614, weekDay = 5, era = 2, day = 20, month = 1}, realDateString = 20211219, ry = 2021, rm = 12, rd = 19, rw = 0 </Locals>|r

user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:365: in function 'Time:UpdateTime'
|caaaaaa<Locals> self = [table:1], time = [table:3]{hour = 0, minute = 23, second = 28}, date = [table:2] </Locals>|r

user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:392: in function 'f'
|caaaaaa<Locals> time = [table:3], date = [table:2] </Locals>|r


user:/AddOns/LibClockTST/Lib/LibClockTST.lua:497: in function 'OnUpdate'
 |caaaaaa<Locals> _ = "ClockTST", f = 
user:/AddOns/ClockTST/Lib/Feature/Time/Time.lua:391 </Locals>|r
From what I could see of it behind the UI Error display window, the Clock 2.0 output on the HUD is missing at least one line, whether it is the first or the second.
__________________
---- Shadowshire ..... nil carborundum illegitimi
Report comment to moderator  
Reply With Quote
Unread 05/29/21, 09:55 AM  
SimonIllyan
 
SimonIllyan's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 187
Uploads: 1
I am preparing to use LibClockTST in The Elder Bar Reloaded, and I noticed something glaringly missing from this otherwise great library: a function to convert month number to name (preferably both Imperial and Argonian). Of course, I have implemented it myself, but it would be nice if LibClockTST provided it. Even better, if :GetTime() and :GetDate methods optionally took two arguments, like os.date does:
Code:
MyLibClockInstance:GetDate("%d %B %Y", some_timestamp)
I believe you already have code for this, but in ClockTST rather than in LibClockTST.
Report comment to moderator  
Reply With Quote
Unread 04/18/21, 03:16 PM  
Phinix
 
Phinix's Avatar
AddOn Author - Click to view AddOns

Forum posts: 167
File comments: 1386
Uploads: 31
Originally Posted by Baertram
...the tag
Code:
## AddOnVersion: <integer>
is essential if you use ## IsLibrary: true to let the ingame addon manager determine the "newest" version of the addon/library.
You shouldn't use a number 0 here but same/similar to the non-official ## Version tag! ## Version is currently ONLY used within Minion, the external addon manager. It's not used ingame by ESO.
Updated without version change. Made the above correction beginning version incrementation at 1 (should probably also be noted that ## AddOnVersion must be a whole number, so no decimal values), and updated the library Minor version to match.

Thanks for the heads-up! To be honest, I have been using this library with ClockTST with "allow out of date" and encountered no problems. The changes I made to the main addon since coming onboard have been essentially cosmetic, so I hadn't really needed to dig into this part, other than to confirm everything appears to be working as far as time constants syncing up to the lunar cycle observable in-game.

So, it will work with the addon version at 0, if you check allow outdated, which I heard might be going away(?). However, there may be an issue where it will still show out of date even if ##APIVersion is current, but I haven't tested it.
Last edited by Phinix : 04/18/21 at 03:17 PM.
Report comment to moderator  
Reply With Quote
Unread 04/18/21, 01:32 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 3821
File comments: 4708
Uploads: 70
Thanks for the library, but the tag
Code:
## AddOnVersion: <integer>
is essential if you use ## IsLibrary: true to let the ingame addon manager determine the "newest" version of the addon/library.
You shouldn't use a number 0 here but same/similar to the non-official ## Version tag! ## Version is currently ONLY used within Minion, the external addon manager. It's not used ingame by ESO. Therefor ## AddOnVersion is to be used.

I'm not sure if the ingame addon manager will detect 0 as a valid version, and if you got a version > 0 the same time would count as newer then.
I hope so
Last edited by Baertram : 04/18/21 at 01:34 PM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.