Civil Date PHP Package

CompiledPattern
in package

FinalYes

Represents a compiled date pattern.

Tags
see
PatternCompiler::compile()
PatternElement

Table of Contents

Methods

__construct()  : mixed
Creates a compiled date pattern.
format()  : string
Formats a date with this pattern.
match()  : array<int, ParseCapture, 1: string}>|false
Matches input text and returns captured token values.

Methods

__construct()

Creates a compiled date pattern.

public __construct(array<int, PatternElement$elements, array<int, string|TokenRule}$parseParts) : mixed
Parameters
$elements : array<int, PatternElement>

Compiled pattern elements.

$parseParts : array<int, string|TokenRule}>

Regular-expression fragments and token parse parts in parse order.

match()

Matches input text and returns captured token values.

public match(string $input) : array<int, ParseCapture, 1: string}>|false
Parameters
$input : string

Input text to match.

Tags
see
ParseCapture::parse()
Return values
array<int, ParseCapture, 1: string}>|false

Matched captures and their values, or false if no match.

On this page

Search results