Can't test currently but I think something like this should work:
Code:
function restore_proj_started()
local ret, proj_started = reaper.GetProjExtState(0, "ARC_COUNTER_TIMER_IN_PROJ_WIN", "PROJECT_STARTED")
return proj_started
end
proj_started = restore_proj_started()
if proj_started ~= "" then -- if not empty string
-- only store date, discard the rest
proj_started = string.sub(proj_started, 1, 10))
end
That would only work if the date substring is always in the form DD.MM.YYYY, otherwise a string match function should be used I think but that's not my field.