# Для всей базы
ALTER DATABASE
database_name
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_unicode_ci;
# Для одной таблицы
ALTER TABLE
table_name
CONVERT TO CHARACTER SET utf8mb4
COLLATE utf8mb4_unicode_ci;
# Для одного поля таблицы
ALTER TABLE
table_name
CHANGE column_name column_name
VARCHAR(191)
CHARACTER SET utf8mb4
COLLATE utf8mb4_unicode_ci;
define('DOCUMENT_ROOT', $_SERVER['DOCUMENT_ROOT']);
if (isset($_SERVER['DOCUMENT_ROOT']))
define('DOCUMENT_ROOT', $_SERVER['DOCUMENT_ROOT']);
else
define('DOCUMENT_ROOT', null);
npm install moment;
let date = somethingString;
let parsedDate = moment(date);
if (!parsedDate) {
return;
}
// continue your magic