Update 0.5.9

Arne Rantzen [08-06-14 - 12:17]
Update 0.5.9

Fixes a few bugs
Filename
Clock.lua
Clock.txt
data/view.lua
diff --git a/Clock.lua b/Clock.lua
index 7458742..06adc13 100644
--- a/Clock.lua
+++ b/Clock.lua
@@ -3,7 +3,7 @@
 -------------------------------------------
 cl = {}

-cl.VERSION = "0.5.8"
+cl.VERSION = "0.5.9"
 cl.SAV_VERSION = 0.552

 -------------------------------------------
diff --git a/Clock.txt b/Clock.txt
index 6aedb3a..6e88aee 100644
--- a/Clock.txt
+++ b/Clock.txt
@@ -13,7 +13,7 @@
 ###################################

 ## Title: Clock - By |c5175ea@Tyx|r
-## Version 0.5.8
+## Version 0.5.9
 ## Author: @Tyx
 ## APIVersion: 100008
 ## SavedVariables: Clock_Settings
diff --git a/data/view.lua b/data/view.lua
index 379af57..31b3530 100644
--- a/data/view.lua
+++ b/data/view.lua
@@ -94,8 +94,8 @@ function vi.ParseFormat(year, month, day, hour, minute, second, isLore)

     local yearShort = year
     local monthZero
-    local monthName
-    local dayName
+    local monthName = ""
+    local dayName = ""
     local dayZero
     local hZero
     local mZero
@@ -149,7 +149,7 @@ function vi.ParseFormat(year, month, day, hour, minute, second, isLore)
     end

     -- day
-    if GetCVar("Language.2") == "en" then
+    if GetCVar("Language.2") == "en" and day ~= 0 then
         if day == 1 then
             day = day .. loc.date.first
         elseif day == 2 then
@@ -419,7 +419,9 @@ function vi.InitClock()
     CALLBACK_MANAGER:RegisterCallback("LAM-PanelControlsCreated",
         function(panel)
             if panel == ClockSettings then
-                GAME_MENU_SCENE:AddFragment(CLOCKUI_SCENE_FRAGMENT)
+				if cl.st.AutoHide() then
+					GAME_MENU_SCENE:AddFragment(CLOCKUI_SCENE_FRAGMENT)
+				end
                 ZO_PreHookHandler(ClockSettings, "OnShow", function() GAME_MENU_SCENE:AddFragment(CLOCKUI_SCENE_FRAGMENT) end)
                 ZO_PreHookHandler(ClockSettings, "OnHide", function() GAME_MENU_SCENE:RemoveFragment(CLOCKUI_SCENE_FRAGMENT) end)
             end