-
Notifications
You must be signed in to change notification settings - Fork 0
/
show-between-test.php
28 lines (20 loc) · 1.37 KB
/
show-between-test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?
return;
$yesterday = '2016-07-13';
$today = '2016-07-14';
$tomorrow = '2016-07-15';
var_dump(kirbytext('(from: '.$yesterday.' …)yes(…from)') === '<p>yes</p>');
var_dump(kirbytext('(from: '.$today.' …)yes(…from)') === '<p>yes</p>');
var_dump(kirbytext('(from: '.$tomorrow.' …)no(…from)') === '');
var_dump(kirbytext('(until: '.$yesterday.' …)no(…from)') === '');
var_dump(kirbytext('(until: '.$today.' …)yes(…from)') === '<p>yes</p>');
var_dump(kirbytext('(until: '.$tomorrow.' …)yes(…from)') === '<p>yes</p>');
var_dump(kirbytext('(from: '.$yesterday.' until: '.$yesterday.' …)no(…from)') === '');
var_dump(kirbytext('(from: '.$today.' until: '.$yesterday.' …)yes(…from)') === '<p>yes</p>');
var_dump(kirbytext('(from: '.$tomorrow.' until: '.$yesterday.' …)no(…from)') === '');
var_dump(kirbytext('(from: '.$yesterday.' until: '.$today.' …)yes(…from)') === '<p>yes</p>');
var_dump(kirbytext('(from: '.$today.' until: '.$today.' …)yes(…from)') === '<p>yes</p>');
var_dump(kirbytext('(from: '.$tomorrow.' until: '.$today.' …)yes(…from)') === '<p>yes</p>');
var_dump(kirbytext('(from: '.$yesterday.' until: '.$tomorrow.' …)yes(…from)') === '<p>yes</p>');
var_dump(kirbytext('(from: '.$today.' until: '.$tomorrow.' …)yes(…from)') === '<p>yes</p>');
var_dump(kirbytext('(from: '.$tomorrow.' until: '.$tomorrow.' …)no(…from)') === '');