<?php
namespace Jet_Form_Builder\Classes;
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
class Date_Tools {
const TIME = 1;
const DATE = 2;
const DATETIME = 3;
public static function time_to_string( string $value, int $stamp_format = self::DATE ): string {
$value = jet_fb_parse_dynamic( $value );
if ( ! is_scalar( $value ) ) {
return '';
}
if ( self::TIME === $stamp_format ) {
return $value;
}
$format = '';
switch ( $stamp_format ) {
case self::DATE:
$format = 'Y-m-d';
break;
case self::DATETIME:
$format = 'Y-m-d\TH:i';
break;
}
// phpcs:ignore WordPress.DateTime.RestrictedFunctions
return Tools::is_valid_timestamp( $value ) ? date( $format, $value ) : $value;
}
}
| nama | waktu | ukuran | owner | perm | aksi |
|---|---|---|---|---|---|
| .. | |||||
| arguments/ | 2026-07-21 14:14 | 7.93 KB | 76129f60960:kunden | dxwrx-r--r | |
| arrayable/ | 2026-07-21 14:14 | 11.71 KB | 76129f60960:kunden | dxwrx-r--r | |
| filters/ | 2026-07-21 14:14 | 12.62 KB | 76129f60960:kunden | dxwrx-r--r | |
| http/ | 2026-07-21 14:14 | 5.52 KB | 76129f60960:kunden | dxwrx-r--r | |
| macro-constants/ | 2026-07-21 14:14 | 2.49 KB | 76129f60960:kunden | dxwrx-r--r | |
| post/ | 2026-07-21 14:14 | 1.13 KB | 76129f60960:kunden | dxwrx-r--r | |
| resources/ | 2026-07-21 14:14 | 18.51 KB | 76129f60960:kunden | dxwrx-r--r | |
| theme/ | 2026-07-21 14:14 | 1.45 KB | 76129f60960:kunden | dxwrx-r--r | |
| value-normalizers/ | 2026-07-21 14:14 | 652 B | 76129f60960:kunden | dxwrx-r--r | |
| attributes-trait.php | 2026-07-21 14:14 | 1.04 KB | 76129f60960:kunden | -xw-x----- | |
| base-attributes-trait.php | 2026-07-21 14:14 | 1.44 KB | 76129f60960:kunden | -xw-x----- | |
| builder-helper.php | 2026-07-21 14:14 | 4.53 KB | 76129f60960:kunden | -xw-x----- | |
| compatibility.php | 2026-07-21 14:14 | 431 B | 76129f60960:kunden | -xw-x----- | |
| date-tools.php | 2026-07-21 14:14 | 780 B | 76129f60960:kunden | -xw-x----- | |
| gallery.php | 2026-07-21 14:14 | 5.1 KB | 76129f60960:kunden | -xw-x----- | |
| get-icon-trait.php | 2026-07-21 14:14 | 281 B | 76129f60960:kunden | -xw-x----- | |
| get-template-trait.php | 2026-07-21 14:14 | 411 B | 76129f60960:kunden | -xw-x----- | |
| html-attributes-trait.php | 2026-07-21 14:14 | 740 B | 76129f60960:kunden | -xw-x----- | |
| instance-trait.php | 2026-07-21 14:14 | 598 B | 76129f60960:kunden | -xw-x----- | |
| regexp-tools.php | 2026-07-21 14:14 | 1.42 KB | 76129f60960:kunden | -xw-x----- | |
| tools.php | 2026-07-21 14:14 | 19.53 KB | 76129f60960:kunden | -xw-x----- | |