diff options
author | Jo-Philipp Wich <jo@mein.io> | 2019-07-11 15:04:54 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-07-11 15:04:54 +0200 |
commit | a7bfaf9b0b2a36c72055e0e23feba193af50e1c9 (patch) | |
tree | 1ea2852bb9931cdf759d0d3845d881a6f3305e46 /modules | |
parent | 43043a46a3be1576bce672d90bcda0be1d6c45a5 (diff) |
luci-base: validation.js: fix nested function declarations
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/validation.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/validation.js b/modules/luci-base/htdocs/luci-static/resources/validation.js index 621e5b8bd5..ca544cb15d 100644 --- a/modules/luci-base/htdocs/luci-static/resources/validation.js +++ b/modules/luci-base/htdocs/luci-static/resources/validation.js @@ -510,11 +510,11 @@ var ValidatorFactory = L.Class.extend({ day = +RegExp.$3, days_in_month = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ]; - function is_leap_year(year) { + var is_leap_year = function(year) { return ((!(year % 4) && (year % 100)) || !(year % 400)); } - function get_days_in_month(month, year) { + var get_days_in_month = function(month, year) { return (month === 2 && is_leap_year(year)) ? 29 : days_in_month[month - 1]; } |