We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Phalcon\Tag::dateField - change first day of week

Hi everybody,

How can I change de first day of week in Phalcon\Tag::dateField?

Thanks, in advance, for any attention.



98.9k

You can use the \DateTime object from PHP (https://php.net/manual/en/datetime.modify.php) and then use:

$date = new \DateTime();
// modify date ...
$this->tag->setDefault('myDate', (string) $date);
echo Phalcon\Tag::dateField('myDate');