Wednesday, January 20th, 2016
To set your time up as ’12 days ago’ instead of dd/mm/yyyy format.
Using ‘php time ago‘
<?php $timeAgo = new TimeAgo();
echo $timeAgo->inWords(get_the_time('jS F Y')); ?> ago
Tags: Date, Format, Time, Time ago
Posted in PHP | No Comments »
Wednesday, January 6th, 2016
Add this code to your website to show the current year e.g. 2016. Can be used to always show the current year in the date format in a copyright statement.
<?php echo date("Y") ?>
Tags: Copyright, Date, Format, PHP, Year
Posted in PHP | No Comments »