Skip to content

Commit

Permalink
Merge pull request #55 from cverond/patch-2
Browse files Browse the repository at this point in the history
Minor editing: changed sample code from js to php
  • Loading branch information
mychidarko committed Apr 10, 2023
2 parents eae40ca + bd86074 commit 18e38da
Showing 1 changed file with 5 additions and 5 deletions.
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

0 comments on commit 18e38da

Please sign in to comment.