When there are four words, these are used for the minutes
This commit is contained in:
parent
ca47018a32
commit
a4b085054e
@ -220,15 +220,18 @@ function display_countcharacters_de(words)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- @fn display_countcharacters_de
|
-- @fn display_countcharacters_de
|
||||||
-- Count the amount of words, used to describe the current time in words
|
-- Count the amount of words, used to describe the current time in words!
|
||||||
|
-- (min1 to min4 are ignored)
|
||||||
-- @param words the same structure, as generated with the function @see display_timestat
|
-- @param words the same structure, as generated with the function @see display_timestat
|
||||||
-- @return the amount of words, used to describe the time or <code>0</code> on errors
|
-- @return the amount of words, used to describe the time or <code>0</code> on errors
|
||||||
function display_countwords_de(words)
|
function display_countwords_de(words)
|
||||||
local amount = 0
|
local amount = 0
|
||||||
for k,v in pairs(words) do
|
for k,v in pairs(words) do
|
||||||
if (v ~= nil and v == 1) then
|
if (v ~= nil and v == 1) then
|
||||||
amount = amount + 1
|
if (k ~= "min1" and k ~= "min2" and k ~= "min3" and k ~= "min4") then
|
||||||
|
amount = amount + 1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return amount
|
return amount
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user