arrays.php
4 weeks ago
dates.php
4 weeks ago
general.php
4 weeks ago
index.php
4 weeks ago
screen.php
4 weeks ago
strings.php
4 weeks ago
dates.php
30 lines
| 1 | <?php |
| 2 | |
| 3 | if ( ! defined( 'ABSPATH' ) ) { |
| 4 | exit; |
| 5 | } |
| 6 | |
| 7 | /* |
| 8 | * Foo Functions - Dates |
| 9 | * A bunch of common and useful functions related to dates |
| 10 | * |
| 11 | * Author: Brad Vincent |
| 12 | * Author URI: http://fooplugins.com |
| 13 | * License: GPL2 |
| 14 | */ |
| 15 | |
| 16 | if ( !function_exists( 'foo_friendly_date' ) ) { |
| 17 | |
| 18 | /** |
| 19 | * Return a friendly date compared to the current date |
| 20 | * |
| 21 | * @param $timestamp string|int The timestamp we want return a friendly date for |
| 22 | * |
| 23 | * @return string A friendly date |
| 24 | */ |
| 25 | function foo_friendly_date( $timestamp ) { |
| 26 | $instance = new Foo_Friendly_Dates_v1(); |
| 27 | return $instance->friendly_date( $timestamp ); |
| 28 | } |
| 29 | } |
| 30 |