Skip to content

Commit 5c09f10

Browse files
authored
Merge pull request jimmiw#78 from twisty/patch-1
Fix LogicException in Readme.
2 parents b1e26de + 52a90be commit 5c09f10

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

README.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,23 @@ composer require jimmiw/php-time-ago
2525

2626
## Using the component
2727

28-
There is now only one way to get the time ago in words
29-
There are now two ways of getting the time ago in words.
28+
There are two ways of getting the time ago in words.
3029

31-
The new way (3.0.0 and up):
30+
By passing `DateTime` objects:
3231

3332
```
3433
$timeAgo = new Westsworld\TimeAgo();
3534
echo $timeAgo->inWords(new DateTime("2010-01-10 23:05:00"));
3635
```
3736

38-
And the old way (please notice the changed interface) before 3.0.0:
37+
By passing strings:
3938

4039
```
4140
$timeAgo = new Westsworld\TimeAgo();
4241
echo $timeAgo->inWordsFromStrings("2010/1/10 23:05:00");
4342
```
4443

45-
Both methods gives the same answer, and uses the same internal logic, I just upgraded
46-
to DateTime, since that what I always use.
44+
Both methods give the same answer, and use the same internal logic.
4745

4846
## Do you want the actual years, months, days, hours, minutes, seconds difference?
4947

0 commit comments

Comments
 (0)