Submit
Path:
~
/
home
/
b
/
f
/
x
/
bfxleof
/
www
/
wp-content
/
plugins
/
wordpress-seo
/
src
/
helpers
/
File Content:
date-helper.php
<?php namespace Yoast\WP\SEO\Helpers; use DateTime; use DateTimeZone; use Exception; /** * A helper object for dates. */ class Date_Helper { /** * Convert given date string to the W3C format. * * If $translate is true then the given date and format string will * be passed to date_i18n() for translation. * * @param string $date Date string to convert. * @param bool $translate Whether the return date should be translated. Default false. * * @return string Formatted date string. */ public function mysql_date_to_w3c_format( $date, $translate = false ) { return \mysql2date( \DATE_W3C, $date, $translate ); } /** * Formats a given date in UTC TimeZone format. * * @param string $date String representing the date / time. * @param string $format The format that the passed date should be in. * * @return string The formatted date. */ public function format( $date, $format = \DATE_W3C ) { $immutable_date = \date_create_immutable_from_format( 'Y-m-d H:i:s', $date, new DateTimeZone( 'UTC' ) ); if ( ! $immutable_date ) { return $date; } return $immutable_date->format( $format ); } /** * Formats the given timestamp to the needed format. * * @param int $timestamp The timestamp to use for the formatting. * @param string $format The format that the passed date should be in. * * @return string The formatted date. */ public function format_timestamp( $timestamp, $format = \DATE_W3C ) { $immutable_date = \date_create_immutable_from_format( 'U', $timestamp, new DateTimeZone( 'UTC' ) ); if ( ! $immutable_date ) { return $timestamp; } return $immutable_date->format( $format ); } /** * Formats a given date in UTC TimeZone format and translate it to the set language. * * @param string $date String representing the date / time. * @param string $format The format that the passed date should be in. * * @return string The formatted and translated date. */ public function format_translated( $date, $format = \DATE_W3C ) { return \date_i18n( $format, $this->format( $date, 'U' ) ); } /** * Returns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT). * * @return int The current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT). */ public function current_time() { return \time(); } /** * Check if a string is a valid datetime. * * @param string $datetime String input to check as valid input for DateTime class. * * @return bool True when datatime is valid. */ public function is_valid_datetime( $datetime ) { if ( \substr( $datetime, 0, 1 ) === '-' ) { return false; } try { return new DateTime( $datetime ) !== false; } catch ( Exception $exception ) { return false; } } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
open-graph
---
0755
schema
---
0755
twitter
---
0755
.DS_Store
10234 bytes
0644
AjaxController.php
2162 bytes
0644
DownloadConfController.php
945 bytes
0644
JsonSerializable.php
577 bytes
0644
LimitStream.php
4209 bytes
0644
article-modified-time-presenter.php
609 bytes
0644
asset-helper.php
2569 bytes
0644
author-archive-helper.php
3531 bytes
0644
bing-presenter.php
638 bytes
0644
blocks-helper.php
2317 bytes
0644
class-metabox-formatter-20260707044405.php
12602 bytes
0644
class-metabox-formatter.php
12602 bytes
0644
class-option-tabs-formatter.php
2321 bytes
0644
class-sitemaps-admin-20260703023908.php
3665 bytes
0644
class-sitemaps-admin-20260707122142.php
3665 bytes
0644
class-sitemaps-admin.php
3665 bytes
0644
class-taxonomy-columns.php
7324 bytes
0644
class-tracking-server-data.php
1989 bytes
0644
class-wpseo-replacement-variable.php
1375 bytes
0644
class-wpseo-statistics.php
1443 bytes
0644
class-yoast-plugin-conflict.php
10390 bytes
0644
class.pack.database.php
30838 bytes
0644
ctrl.package.php
17073 bytes
0644
current-page-helper.php
12153 bytes
0644
date-helper.php
2846 bytes
0644
define.php
4567 bytes
0644
description-presenter-20260623011438.php
1026 bytes
0644
duplicator-20260704004435.php
1781 bytes
0644
duplicator-en_US.mo
582 bytes
0644
duplicator.php
1781 bytes
0644
elFinderPlugin.php
3331 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623050500-20260706090318.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623050500.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623171315.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class.php
48544 bytes
0644
environment-helper.php
596 bytes
0644
exceptions.php
708 bytes
0644
flexible-widget.php
11167 bytes
0644
get-request-conditional.php
466 bytes
0644
home-url-helper.php
770 bytes
0644
image-helper.php
10231 bytes
0644
inc.data.php
5121 bytes
0644
inc.validator.php
5401 bytes
0644
index-20260705034705.php
38 bytes
0644
index.php
157663 bytes
0644
indexable-helper.php
4687 bytes
0644
indexing-helper.php
8009 bytes
0644
language-helper.php
1801 bytes
0644
loco.php
5626 bytes
0644
loco.xml
657 bytes
0644
manager.php
14659 bytes
0644
meta-fields-presenter.php
1600 bytes
0644
meta-helper.php
2613 bytes
0644
module.php
1297 bytes
0644
notification-helper.php
546 bytes
0644
options-helper.php
3022 bytes
0644
pagination-helper.php
3557 bytes
0644
post-helper.php
4819 bytes
0644
post-type-helper.php
3521 bytes
0644
primary-term-helper.php
1399 bytes
0644
product-helper.php
659 bytes
0644
quick-edit-handler-1650-20260707073901.js
1848 bytes
0644
quick-edit-handler-1650.js
1848 bytes
0644
recovery.php
1146 bytes
0644
redirect-helper.php
1458 bytes
0644
request-helper.php
352 bytes
0644
require-file-helper.php
305 bytes
0644
robots-helper.php
526 bytes
0644
root.php
1951 bytes
0644
short-link-helper.php
3375 bytes
0644
site-helper.php
566 bytes
0644
social.php
725 bytes
0644
taxonomy-helper.php
3109 bytes
0644
uninstall.php
4401 bytes
0644
url-helper.php
4729 bytes
0644
user-helper.php
3763 bytes
0644
woocommerce-helper.php
879 bytes
0644
wordpress-seo-es_ES.json
25583 bytes
0644
wordpress-seojs-ar.json
25925 bytes
0644
wordpress-seojs-bs_BA.json
13790 bytes
0644
wordpress-seojs-es_CR.json
14212 bytes
0644
wordpress-seojs-es_ES.json
20568 bytes
0644
wordpress-seojs-gl_ES-20260704065626.json
20143 bytes
0644
wordpress-seojs-gl_ES.json
20143 bytes
0644
wordpress-seojs-ja.json
21424 bytes
0644
wordpress-seojs-uk.json
26506 bytes
0644
wp-query-wrapper.php
834 bytes
0644
N4ST4R_ID | Naxtarrr