php-dates 0.2.0

PHP date() patterns for Rust: strict createFromFormat-style parsing, a pattern resolution contract and a Day.js export, with no framework dependency
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Changelog

## 0.2.0

- Every token of PHP 8.5's `DateTime::format()` formats: `D l N S w z W F M t L o X x B v u e I O P p T Z c r U` join the
  ones of 0.1.
- `PhpDatePattern::parse_at` and `parse_now` read like `DateTime::createFromFormat()`, with `!`, `|`, `?`, `*`, `#`,
  zones, time stamps, day and month names and the fields filled from a given "now".
- `PhpDateTime` and `Zone` carry the time zone, as an identifier, an abbreviation or an offset.
- `compile` accepts letters that are not tokens, as PHP does. Use `compile_strict` for the previous behaviour.
- `to_dayjs` also translates `D l M F w v O P U`.
- Dates are `jiff` types instead of `chrono`, matching Laravel for Rust. `PhpDatePattern::parse` returns a
  `jiff::civil::DateTime`.
- Tested against PHP 8.5.0 with generated fixtures.

## 0.1.0

First release: `d j m n Y y H G h g i s a A`, strict parsing and the Day.js export.