1. Go to this page and download the library: Download shomeya/shomeya_utility library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$build = [
'#type' => 'time',
'#timestamp' => '1456527560', // Unix timestamp to use for the date, will be used to populate a ISO 8601 in the 'datetime' attribute of the tag
'#value' => 'Friday, Feb. 26th', // The value to be displayed
'#options' => [
'timeago' => TRUE, // Whether or not the element should be rendered as timeago using javascript
],
'#attributes' => [ // additional attributes for the element
'class' => 'my-time-element',
],
];
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.