Thread Tools Display Modes
05-30-10, 03:55 AM   #1
Kendian
A Molten Giant
 
Kendian's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 614
sStats Clock help

Where exactly would I insert ("%a %b %dth, %I:%M %p") into http://www.wowinterface.com/download...ats_Clock.html, to get it to read that, instead of just the time, please? Ive tried multiple places, all wrong. =( The ,lua file is filled with helpful suggestions on how to do it my self, but I'm SOOO lost! Beg pardon for asking so many noob questions, I AM trying to learn, lol, so bear with me please >.<
  Reply With Quote
05-30-10, 02:23 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
You would use those codes to format your string, but you would need to use a different function than I'm using in sStats_clock. Instead of GameTime_GetTime(), you'd use date().

Note: for sStats, you need a prefix and a suffix (though, one of them could just be an empty string of ""). Decide if you want your formatted text to be colored like the prefix or colored like the suffix. Or, if you want it split in two. Here are a few examples, assuming you had prefix colored white and suffix colored light blue.



Default sStats_clock code:
Code:
local time, suffix = strsplit(" ", GameTime_GetTime(true))
Code:
sStats:SetModuleText(sStats_clockText, time, " "..suffix)


Changing those lines to the below, net the following results:

Code:
local time = date("%a %b %dth, %I:%M %p")
Code:
sStats:SetModuleText(sStats_clockText, time, "")
Displays: Sun May 30th, 08:07 PM


Code:
local time = date("%a %b %dth, %I:%M %p")
Code:
sStats:SetModuleText(sStats_clockText, "", time)
Displays: Sun May 30th, 08:07 PM


Code:
local day, time = date("%a %b %dth"), date("%I:%M %p")
Code:
sStats:SetModuleText(sStats_clockText, day.." ", time)
Displays: Sun May 30th 08:07 PM


/edit: the GameTime_GetTime() function allows sStats to accommodate whether the local time or server time are enabled in the clock options. I don't quite remember which date() will net you.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh


Last edited by Seerah : 05-30-10 at 02:25 PM.
  Reply With Quote
05-30-10, 08:27 PM   #3
Kendian
A Molten Giant
 
Kendian's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 614
Foolish

That was PERFECT. Now I see it broke down like that, I feel pretty foolish for not being able to figure it out myself >.< My thanks, as always, for your help, lady~
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » sStats Clock help

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off