Skip to content

Commit 89fbc1f

Browse files
committed
wip
1 parent f826622 commit 89fbc1f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/2-features/15-datetime.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ PHP provides multiple date and time implementations. There is [`DateTime`](https
1010

1111
Tempest provides an alternative to [`DateTimeInterface`](https://www.php.net/manual/en/class.datetimeinterface.php), partially based on [`IntlCalendar`](https://www.php.net/manual/en/class.intlcalendar.php). This implementation provides a better API with a more consistent interface. It was initially created by {x:azjezz} for the [PSL](https://github.com/azjezz/psl), and was ported to Tempest so it could be deeply integrated.
1212

13+
:::info
14+
You're not required to use Tempest's DateTime implementation, and may as well use PHP's native datetime, Carbon, or any other. If you rely on third-party libraries like Carbon, you should read about [global casters and serializers](/2.x/features/mapper#registering-casters-and-serializers-globally) as well to ensure model support.
15+
:::
16+
1317
## Creating date instances
1418

1519
The {`Tempest\DateTime\DateTime`} class provides a `DateTime::parse()` method to create a date from a string, a timestamp, or another datetime instance. This is the most flexible way to create a date instance.

0 commit comments

Comments
 (0)