Skip to main content

Crate php_dates

Crate php_dates 

Source
Expand description

PHP date patterns for Rust.

PhpDatePattern formats like DateTime::format() and parses like DateTime::createFromFormat(), in English, with PhpDateTime and Zone for time zones. formats resolves which pattern applies from a DateConfig and exports patterns to Day.js.

Re-exports§

pub use formats::Kind;
pub use formats::Purpose;

Modules§

formats
The date format contract: PHP patterns on the server; frontend_config exports the equivalent Day.js patterns.

Structs§

DateConfig
Where the date patterns of an application are configured: one per kind, one per purpose, and two legacy settings used when nothing else is set.
DatePatterns
One pattern per kind.
ParseError
Why a value did not match a pattern.
PhpDatePattern
A compiled PHP date pattern.
PhpDateTime
A date and time with its time zone: what DateTime::format() prints and createFromFormat() returns.

Enums§

Error
A date pattern that cannot be used.
Zone
A time zone, in the three forms PHP has: an identifier, an abbreviation and a fixed offset.

Type Aliases§

Result
A date pattern that failed validation.