- Fixed month() and days() format which were prepending zero ; adjusted to make it's behaviour like MySQL method

This commit is contained in:
Dave M. 2024-11-14 13:40:47 +00:00
parent 68a6636c06
commit 4ad44f73d7
1 changed files with 2 additions and 2 deletions

View File

@ -191,8 +191,8 @@ class SQLite implements AdapterInterface, MigrateInterface, SqlAdapterInterface
return (int) in_array($string, explode(',', $string_list));
}, 2);
$pdo->sqliteCreateFunction('day', fn($date) => ( new \DateTime($date) )->format('d'), 1);
$pdo->sqliteCreateFunction('month', fn($date) => ( new \DateTime($date) )->format('m'), 1);
$pdo->sqliteCreateFunction('day', fn($date) => ( new \DateTime($date) )->format('j'), 1);
$pdo->sqliteCreateFunction('month', fn($date) => ( new \DateTime($date) )->format('n'), 1);
$pdo->sqliteCreateFunction('year', fn($date) => ( new \DateTime($date) )->format('Y'), 1);
}