Created
February 27, 2016 14:45
-
-
Save cakephp-tutorial/f340eb2d6064aef673b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# Ipotizziamo che la data di oggi sia il 15/12/2014 | |
echo $this->Customtime->format(date('2014-12-15 15:20:15')); | |
# 'Oggi alle 15:20' | |
echo $this->Customtime->format(date('2014-12-14 15:20:15')); | |
# 'Ieri alle 15:20' | |
echo $this->Customtime->format(date('2014-11-14 15:20:15')); | |
# '14 Novembre' | |
echo $this->Customtime->format(date('2013-10-14 15:20:15')); | |
# '14/10/2013' | |
echo $this->Customtime->format(date('2015-10-14 15:20:15')); | |
# '14/10/2015' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment