בדוקי עריכות אוטומטית, אינטערפעיס רעדאקטארן, אינטערפעיס אדמיניסטראַטאָרן, סיסאפן, מייבאים, מעדכנים, מייבא, אספקלריה רעדאקטארן
46,365
רעדאגירונגען
ברוך (שמועס | ביישטייערונגען) (אימפארטירט פון די העברישע המכלול, זע ביישטייערער ליסטע) |
(געמאכט אז ב'תקט"ז זאל ווערן 2516 אנשטאט 518, און אראפגענומען אומבאנוצטע פונקציעס) |
||
| שורה 36: | שורה 36: | ||
local gimatria = function(s) | local gimatria = function(s) | ||
local | -- Check for a thousands separator (apostrophe) | ||
for l in mw.ustring.gmatch( s, "." ) do | local thousands, rest = s:match("^(.-)'(.*)$") | ||
return | if thousands then | ||
local total = 0 | |||
local thousandsValue = 0 | |||
-- Calculate gematria for the thousands part | |||
for l in mw.ustring.gmatch(thousands, ".") do | |||
thousandsValue = thousandsValue + (values[l] or endet[l] or 0) | |||
end | |||
total = thousandsValue * 1000 | |||
-- Add gematria for the rest of the number (ignoring extra apostrophes) | |||
for l in mw.ustring.gmatch(rest, ".") do | |||
total = total + (values[l] or endet[l] or 0) | |||
end | |||
return total | |||
else | |||
local total = 0 | |||
for l in mw.ustring.gmatch(s, ".") do | |||
total = total + (values[l] or endet[l] or 0) | |||
end | |||
return total | |||
end | |||
end | end | ||
| שורה 74: | שורה 93: | ||
['מספר לאותיות'] = function( frame ) | ['מספר לאותיות'] = function( frame ) | ||
return mispar_lotiot( (tonumber(frame.args[1]) or 0), ( frame.args[2] or '' )) | return mispar_lotiot( (tonumber(frame.args[1]) or 0), ( frame.args[2] or '' )) | ||
end, | end, | ||
} | } | ||
רעדאגירונגען