Rust

parse

Module

timelib_strtotime (parse_date.re): PHP's free-form date/time parser, used by strtotime(), date_parse(), new DateTime(), DateTime::modify() and DateInterval::createFromDateString().

Contents

use php_std::datetime::parse::Message;
Rust
pub struct Message

One error or warning: where (byte offset in the trimmed input), the byte there, and the message.

use php_std::datetime::parse::Messages;
Rust
pub struct Messages

timelib_error_container.

use php_std::datetime::parse::RelUnit;
Rust
pub struct RelUnit

A relative time word: its name, unit and multiplier (timelib_relunit).

use php_std::datetime::parse::Unit;
Rust
pub enum Unit

The unit of a relative time word (timelib_relunit).

use php_std::datetime::parse::is_c_space;
Rust
pub fn is_c_space(c: u8) -> bool

C isspace in the C locale.

use php_std::datetime::parse::strtotime;
Rust
pub fn strtotime(input: &[u8]) -> (Time, Messages)

timelib_strtotime: the parsed (unnormalized) time and the errors and warnings, positions relative to the input with surrounding whitespace removed.