View source for Module:Version
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
-- Current stable version. Increment this when a new version is released.
-- The version of Elin is made of <major version>.<minor version>
local CURRENT = 23.67
local _, _, CURRENT_major, CURRENT_minor = string.find( CURRENT, "(%d+)%.(%d+)" )
local p = {}
-- This function assume the input is in the form of <major version>.<minor version>, but it doesn't give an error if minor version doesn't exist.
-- Return:
-- 2, the minor version is 21 or more away, or the major version is at least 1 away.
-- 1, the minor version is 1~20 away from the current version.
-- 0, the versions are the same
-- -1, the input version is greater
local function if_greater_function(test_version)
_, _, major, minor = string.find( test_version, "(%d+)%.(%d+)" )
if CURRENT_major > major then
return 2
elseif CURRENT_major < major then
return -1
elseif CURRENT_minor < minor then
000
1:0
Template used on this page:
Return to Module:Version.