Skip to content

Commit 3615e43

Browse files
committed
Add visualizer
1 parent acc50ce commit 3615e43

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ All notable changes to `period` will be documented in this file
66

77
- initial release
88

9+
## 0.4.0 - 2018-12-19
10+
11+
- Add visualizer
12+
913
## 0.3.3 - 2018-12-18
1014

1115
- Support edge case for two period diffs

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ objects to see how they related to one another:
257257

258258
```php
259259
$visualizer = new Visualizer(["width" => 27]);
260+
260261
$visualizer->visualize([
261262
"A" => Period::make('2018-01-01', '2018-01-31'),
262263
"B" => Period::make('2018-02-10', '2018-02-20'),
@@ -271,6 +272,7 @@ $visualizer->visualize([
271272
```
272273

273274
And visualize will return the following string:
275+
274276
```
275277
A [========]
276278
B [==]
@@ -281,6 +283,7 @@ OVERLAP [===] [==] [==]
281283

282284
The visualizer has a configurable width provided upon creation
283285
which will control the bounds of the displayed periods:
286+
284287
```php
285288
$visualizer = new Visualizer(["width" => 10]);
286289
```

0 commit comments

Comments
 (0)