diff options
author | RaindropsSys <raindrops@equestria.dev> | 2023-11-18 11:34:36 +0100 |
---|---|---|
committer | RaindropsSys <raindrops@equestria.dev> | 2023-11-18 11:34:36 +0100 |
commit | 9337aae8b1c87fad34884dacd5cd79d9591c60db (patch) | |
tree | 5340f9fa67cd6236e4c879f0057d51d0b1e21361 /includes/util/bitset.inc | |
parent | 953ddd82e48dd206cef5ac94456549aed13b3ad5 (diff) | |
download | pluralconnect-9337aae8b1c87fad34884dacd5cd79d9591c60db.tar.gz pluralconnect-9337aae8b1c87fad34884dacd5cd79d9591c60db.tar.bz2 pluralconnect-9337aae8b1c87fad34884dacd5cd79d9591c60db.zip |
Updated 39 files, added 86 files, deleted 40 files and renamed 2 files (automated)
Diffstat (limited to 'includes/util/bitset.inc')
-rw-r--r-- | includes/util/bitset.inc | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/includes/util/bitset.inc b/includes/util/bitset.inc deleted file mode 100644 index 14f178c..0000000 --- a/includes/util/bitset.inc +++ /dev/null @@ -1,25 +0,0 @@ -<?php - -function parseMetadata ($metadata) { - $metadata["little"] = 0; - - $age = -1; - - if (isset($metadata["birth"]["age"]) && $metadata["birth"]["age"] !== 0) { - $age = $metadata["birth"]["age"]; - } else if (isset($metadata["birth"]["year"]) && $metadata["birth"]["year"] > 1990) { - $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) { - $metadata["little"] = 3; - } - - return $metadata; -}
\ No newline at end of file |