• 0

    posted a message on Help with nClock time formatting
    Nvm found what I was looking for it was accually further down in the lua, thanks for the help on this.
    Posted in: AddOn HELP!
  • 0

    posted a message on Help with nClock time formatting
    Thanks for the replies, i'm a total noob at .lua and after going to the link provided by egingell it seems that the creater of this addon used something total different.


    As stated above im a noob at this so not sure where to switch things out to get 12 hour format. Right now in game it shows 22.45 for time so i guess ill just try to play with it.
    Posted in: AddOn HELP!
  • 0

    posted a message on Help with nClock time formatting
    I'm not sure if this is the right area to post this. But i need some help with .lua formating.

    I want the time on the nClock addon to be in 12 hour format instead of 24 hour format and have no idea how to do it.

    Listed below is the code in the addon i think needs changed.

    Thanks in advance for any help with this.


    local function TimeFormat(time)
    	local t = format("%.1ds",floor(mod(time,60)))
    	if (time > 60) then
    		time = floor(time / 60)
    		t = format("%.1dm ",mod(time,60))..t
    		if (time > 60) then
    			time = floor(time / 60)
    			t = format("%.1dh ",mod(time,24))..t
    			if (time > 24) then
    				time = floor(time / 24)
    				t = format("%dd ",time)..t
    			end
    		end
    	end
    	return t
    end
    
    Posted in: AddOn HELP!
  • To post a comment, please or register a new account.