Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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
You can’t perform that action at this time.