Skip to content

Commit 6947019

Browse files
committed
Improve constant name
1 parent 078e2ce commit 6947019

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

wp-includes/sqlite-ast/class-wp-sqlite-driver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ class WP_SQLite_Driver {
182182
* https://www.sqlite.org/lang_datefunc.html
183183
* https://strftime.org/
184184
*/
185-
const DATE_FORMAT_TO_STRFTIME_MAP = array(
185+
const MYSQL_DATE_FORMAT_TO_SQLITE_STRFTIME_MAP = array(
186186
'%a' => '%D',
187187
'%b' => '%M',
188188
'%c' => '%n',
@@ -1985,7 +1985,7 @@ private function translate_function_call( WP_Parser_Node $node ): string {
19851985
case 'DATE_FORMAT':
19861986
list ( $date, $mysql_format ) = $args;
19871987

1988-
$format = strtr( $mysql_format, self::DATE_FORMAT_TO_STRFTIME_MAP );
1988+
$format = strtr( $mysql_format, self::MYSQL_DATE_FORMAT_TO_SQLITE_STRFTIME_MAP );
19891989
if ( ! $format ) {
19901990
throw $this->new_driver_exception(
19911991
sprintf(

0 commit comments

Comments
 (0)