wppaste
WordPress

Date

Source
wp-includes/SimplePie/src/Parse/Date.php:13
Date Parser

Compatibility

WordPress
core
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Properties · 8

$datestringpublic
Input data
$daySimplePie\Parse\array<string,public
List of days, calendar day name => ordinal day number in the week
$monthSimplePie\Parse\array<string,public
List of months, calendar month name => calendar month number
$timezoneSimplePie\Parse\array<string,public
List of timezones, abbreviation => offset from UTC
$day_pcrestringpublic
Cached PCRE for Date::$day
$month_pcrestringpublic
Cached PCRE for Date::$month
$built_inSimplePie\Parse\array<string>public
Array of user-added callback methods
$userSimplePie\Parse\array<callable(string):public
Array of user-added callback methods

Methods · 10

Source code

class Date{    /**     * Input data     *     * @access protected     * @var string     */    public $date;     /**     * List of days, calendar day name => ordinal day number in the week     *     * @access protected     * @var array<string, int<1,7>>     */    public $day = [        // English        'mon' => 1,        'monday' => 1,        'tue' => 2,        'tuesday' => 2,        'wed' => 3,        'wednesday' => 3,        'thu' => 4,        'thursday' => 4,        'fri' => 5,        'friday' => 5,        'sat' => 6,        'saturday' => 6,        'sun' => 7,        'sunday' => 7,        // Dutch        'maandag' => 1,        'dinsdag' => 2,        'woensdag' => 3,        'donderdag' => 4,        'vrijdag' => 5,        'zaterdag' => 6,        'zondag' => 7,        // French        'lundi' => 1,        'mardi' => 2,        'mercredi' => 3,        'jeudi' => 4,        'vendredi' => 5,        'samedi' => 6,        'dimanche' => 7,        // German        'montag' => 1,        'mo' => 1,        'dienstag' => 2,        'di' => 2,        'mittwoch' => 3,        'mi' => 3,        'donnerstag' => 4,        'do' => 4,        'freitag' => 5,        'fr' => 5,        'samstag' => 6,        'sa' => 6,        'sonnabend' => 6,        // AFAIK no short form for sonnabend        'so' => 7,        'sonntag' => 7,        // Italian        'lunedì' => 1,        'martedì' => 2,        'mercoledì' => 3,        'giovedì' => 4,        'venerdì' => 5,        'sabato' => 6,        'domenica' => 7,        // Spanish        'lunes' => 1,        'martes' => 2,        'miércoles' => 3,        'jueves' => 4,        'viernes' => 5,        'sábado' => 6,

Changelog

Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/SimplePie/src/Parse/Date.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.