Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor editing: changed sample code from js to php #55

Merged
merged 1 commit into from
Apr 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/modules/date/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ tick()->set('hour', 5)->set('minute', 55)->set('second', 15);

Once you have a Tick object, you may want to manipulate it in some way.

Day.js supports method chaining like this:
Tick supports method chaining like this:

```php
tick('2019-01-25')->add(1, 'day')->subtract(1, 'year')->year(2009)->toString()
Expand All @@ -239,11 +239,11 @@ tick('2019-01-25')->add(1, 'day')->subtract(1, 'year')->year(2009)->toString()
Returns a cloned Tick object with a specified amount of time added.

```php
const a = tick()
const b = a.add(7, 'day')
$a = tick();
$b = a->add(7, 'day')

// a -> the original value and will not change
// b -> the manipulation result
// $a -> the original value and will not change
// $b -> the manipulation result
```

Units are case insensitive, short forms are case sensitive.
Expand Down