diff options
author | RaindropsSys <contact@minteck.org> | 2023-03-15 22:40:55 +0100 |
---|---|---|
committer | RaindropsSys <contact@minteck.org> | 2023-03-15 22:40:55 +0100 |
commit | 940defd2939f52480ed5b548189b549457944995 (patch) | |
tree | 7ca52eca3c3fcafe507dc24b4e2812ab785acc29 /includes/util/bitset.inc | |
parent | eb89b15c0f044673c1206a418a21d0baba1a675e (diff) | |
download | pluralconnect-940defd2939f52480ed5b548189b549457944995.tar.gz pluralconnect-940defd2939f52480ed5b548189b549457944995.tar.bz2 pluralconnect-940defd2939f52480ed5b548189b549457944995.zip |
Updated 14 files (automated)
Diffstat (limited to 'includes/util/bitset.inc')
-rw-r--r-- | includes/util/bitset.inc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/includes/util/bitset.inc b/includes/util/bitset.inc index 131cb39..14f178c 100644 --- a/includes/util/bitset.inc +++ b/includes/util/bitset.inc @@ -11,6 +11,10 @@ function parseMetadata ($metadata) { $age = (int)date('Y') - $metadata["birth"]["year"] + (strtotime(date('Y') . "-" . $metadata["birth"]["date"]) <= time() ? 0 : -1); } + if (is_string($age) && isset(explode("-", $age)[1]) && is_numeric(explode("-", $age)[1])) { + $age = (int)explode("-", $age)[1]; + } + if ($age > 0 && $age <= 10) { $metadata["little"] = 2; } else if ($age > 0 && $age <= 15) { |