PluginProbe
UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP / 1.2.16
UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP v1.2.16
1.2.73 1.2.72 1.2.71 1.2.70 1.2.69 1.2.68 1.2.67 1.2.66 1.2.65 1.2.64 1.2.63 trunk 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.20 1.0.21 1.0.22 All 173 releases
userswp / includes / helpers / date.php

date.php in UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP 1.2.16, at includes/helpers/date.php

57 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Converts PHP Date format to jQuery UI date format.
4 *
5 * @since 1.0.0
6 * @package userswp
7 * @param string $php_format Date Format.
8 * @return string Formatted Date.
9 */
10 function uwp_date_format_php_to_jqueryui( $php_format ) {
11 $date = new UsersWP_Date();
12 return $date->date_format_php_to_jqueryui($php_format);
13 }
14
15 /**
16 * Converts date from one format to another.
17 *
18 * @since 1.0.0
19 * @package userswp
20 * @param string $date_input Date string to convert.
21 * @param string $date_to Date format to convert to.
22 * @param string $date_from Date format to convert from.
23 * @return string Converted date.
24 */
25 function uwp_date($date_input, $date_to, $date_from = '') {
26 $date = new UsersWP_Date();
27 return $date->date($date_input, $date_to, $date_from);
28 }
29
30 /**
31 * Converts non english date months to english date months.
32 *
33 * @since 1.0.0
34 * @package userswp
35 * @param string $non_english_date Date String.
36 * @return string Converted Date.
37 */
38 function uwp_maybe_untranslate_date($non_english_date){
39 $date = new UsersWP_Date();
40 return $date->maybe_untranslate_date($non_english_date);
41 }
42
43 /**
44 * Gets random date.
45 *
46 * @since 1.0.0
47 * @package userswp
48 *
49 * @param int $days_from Random days from.
50 * @param int $days_to Random days to.
51 *
52 * @return string Formatted date string.
53 */
54 function uwp_get_random_date( $days_from = 30, $days_to = 0 ) {
55 $date = new UsersWP_Date();
56 return $date->get_random_date($days_from, $days_to);
57 }