Skip to content

Commit

Permalink
Merge pull request #948 from cakephp/4.next-datetime-format
Browse files Browse the repository at this point in the history
4.next: add example on how to set custom date/time format
  • Loading branch information
markstory authored Apr 13, 2023
2 parents b75cc96 + d8e75bb commit cab3c1b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions config/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,3 +221,9 @@
//Inflector::rules('plural', ['/^(inflect)or$/i' => '\1ables']);
//Inflector::rules('irregular', ['red' => 'redlings']);
//Inflector::rules('uninflected', ['dontinflectme']);

// set a custom date and time format
// see https://book.cakephp.org/4/en/core-libraries/time.html#setting-the-default-locale-and-format-string
// and https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax
//\Cake\I18n\FrozenDate::setToStringFormat('dd.MM.yyyy');
//\Cake\I18n\FrozenTime::setToStringFormat('dd.MM.yyyy HH:mm');

0 comments on commit cab3c1b

Please sign in to comment.