GRAYBYTE WORDPRESS FILE MANAGER5443

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/giriqfky/chahida.co.in/wp-content/plugins/wpforms-lite/includes/functions/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/giriqfky/chahida.co.in/wp-content/plugins/wpforms-lite/includes/functions//date-time.php
<?php
/**
 * Helper functions to work with dates, time and timezones.
 *
 * @since 1.8.0
 */

/**
 * Return date and time formatted as expected.
 *
 * @since 1.6.3
 *
 * @param string|int $date       Date to format.
 * @param string     $format     Optional. Format for the date and time.
 * @param bool       $gmt_offset Optional. GTM offset.
 *
 * @return string
 */
function wpforms_datetime_format( $date, $format = '', $gmt_offset = false ) {

	if ( is_numeric( $date ) ) {
		$date = (int) $date;
	}

	if ( is_string( $date ) ) {
		$date = strtotime( $date );
	}

	if ( $gmt_offset ) {
		$date += (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS );
	}

	if ( $format === '' ) {
		return sprintf( /* translators: %1$s - formatted date, %2$s - formatted time. */
			__( '%1$s at %2$s', 'wpforms-lite' ),
			date_i18n( get_option( 'date_format' ), $date ),
			date_i18n( get_option( 'time_format' ), $date )
		);
	}

	return date_i18n( $format, $date );
}

/**
 * Return date formatted as expected.
 *
 * @since 1.6.3
 *
 * @param string|int $date       Date to format.
 * @param string     $format     Optional. Format for the date.
 * @param bool       $gmt_offset Optional. GTM offset.
 *
 * @return string
 */
function wpforms_date_format( $date, $format = '', $gmt_offset = false ) {

	if ( $format === '' ) {
		$format = (string) get_option( 'date_format', 'M j, Y' );
	}

	return wpforms_datetime_format( $date, $format, $gmt_offset );
}

/**
 * Return time formatted as expected.
 *
 * @since 1.8.5
 *
 * @param string|int $date       Date to format.
 * @param string     $format     Optional. Format for the time.
 * @param bool       $gmt_offset Optional. GTM offset.
 *
 * @return string
 */
function wpforms_time_format( $date, $format = '', $gmt_offset = false ) {

	if ( $format === '' ) {
		$format = (string) get_option( 'time_format', 'g:ia' );
	}

	return wpforms_datetime_format( $date, $format, $gmt_offset );
}

/**
 * Get the certain date of a specified day in a specified format.
 *
 * @since 1.4.4
 * @since 1.6.3 Added $use_gmt_offset parameter.
 *
 * @param string $period         Supported values: start, end.
 * @param string $timestamp      Default is the current timestamp, if left empty.
 * @param string $format         Default is a MySQL format.
 * @param bool   $use_gmt_offset Use GTM offset.
 *
 * @return string
 */
function wpforms_get_day_period_date( $period, $timestamp = '', $format = 'Y-m-d H:i:s', $use_gmt_offset = false ) {

	$date = '';

	if ( empty( $timestamp ) ) {
		$timestamp = time();
	}

	$offset_sec = $use_gmt_offset ? get_option( 'gmt_offset' ) * 3600 : 0;

	switch ( $period ) {
		case 'start_of_day':
			$date = gmdate( $format, strtotime( 'today', $timestamp ) - $offset_sec );
			break;

		case 'end_of_day':
			$date = gmdate( $format, strtotime( 'tomorrow', $timestamp ) - 1 - $offset_sec );
			break;
	}

	return $date;
}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 10 2025 04:32:23
giriqfky / giriqfky
0755
.htaccess
0.41 KB
July 10 2025 04:32:23
giriqfky / giriqfky
0644
access.php
10.478 KB
June 05 2025 16:54:44
giriqfky / giriqfky
0644
builder.php
1.377 KB
June 17 2025 13:49:02
giriqfky / giriqfky
0644
checks.php
15.965 KB
June 17 2025 13:49:02
giriqfky / giriqfky
0644
colors.php
3.972 KB
November 28 2023 16:59:36
giriqfky / giriqfky
0644
data-presets.php
19.031 KB
February 16 2023 18:36:38
giriqfky / giriqfky
0644
date-time.php
2.824 KB
June 05 2025 16:54:44
giriqfky / giriqfky
0644
debug.php
5.229 KB
September 26 2024 15:36:36
giriqfky / giriqfky
0644
education.php
2.894 KB
June 17 2025 13:49:02
giriqfky / giriqfky
0644
escape-sanitize.php
13.899 KB
January 28 2025 17:46:12
giriqfky / giriqfky
0644
filesystem-media.php
6.6 KB
April 24 2025 14:53:30
giriqfky / giriqfky
0644
form-fields.php
16.983 KB
June 05 2025 16:54:44
giriqfky / giriqfky
0644
forms.php
13.321 KB
April 24 2025 14:53:30
giriqfky / giriqfky
0644
list.php
6.875 KB
June 13 2024 16:24:36
giriqfky / giriqfky
0644
payments.php
21.876 KB
April 24 2025 14:53:30
giriqfky / giriqfky
0644
plugins.php
2.375 KB
June 05 2025 16:54:44
giriqfky / giriqfky
0644
privacy.php
2.516 KB
February 27 2025 17:40:00
giriqfky / giriqfky
0644
providers.php
1.992 KB
June 05 2025 16:54:44
giriqfky / giriqfky
0644
utilities.php
8.538 KB
June 05 2025 16:54:44
giriqfky / giriqfky
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF