Civil Date PHP Package

PatternCompiler
in package

FinalYes

Compiles date-pattern strings.

A pattern combines date-field tokens with text that must appear as written. Known token symbols select date fields. Other characters are treated as literal text. Single or double quotes can group literal text, and a backslash escapes the following character.

A calendar scope is a bracketed sub-pattern evaluated in another calendar. Scope syntax is [Calendar:pattern], for example [Gregorian:Y-m-d]. Scope names match Calendar case names case-insensitively. Scopes cannot be nested.

Tags
see
CompiledPattern
TokenRegistry
CalendarDate::format()
CalendarDate::parse()

Table of Contents

Methods

__construct()  : mixed
Creates a pattern compiler.
compile()  : CompiledPattern
Compiles a date pattern.
revision()  : int
Returns the current compiler revision.
shared()  : self
Returns the shared pattern compiler.

Methods

revision()

Returns the current compiler revision.

public revision() : int
Return values
int

Compiler revision.

shared()

Returns the shared pattern compiler.

public static shared() : self
Return values
self

Pattern compiler.

On this page

Search results