Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SmetDenis committed Apr 2, 2024
1 parent fa221db commit 865d30a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ columns:
is_time: true # Check if the cell value is a valid time in the format "HH:MM:SS AM/PM" / "HH:MM:SS" / "HH:MM". Case-insensitive.
is_leap_year: true # Check if the cell value is a leap year. Example: "2008", "2008-02-29 23:59:59 UTC".

# Date Intervals. Under the hood, the strings are converted to microseconds and compared.
# Date Intervals. Under the hood, the strings are converted to seconds and compared.
# See: https://www.php.net/manual/en/class.dateinterval.php
# See: https://www.php.net/manual/en/dateinterval.createfromdatestring.php
date_interval_min: PT0S # 0 seconds
Expand Down
6 changes: 0 additions & 6 deletions tests/Rules/Cell/ComboDateIntervalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ public function testEqual(): void
isSame('', $rule->test($examples[0]), $examples[0]);
}

isSame(
'The date interval of the value "2000-10-02 00:00:01" is parsed as "0" seconds, ' .
'which is not equal than the expected "31557600 (P1Y) seconds"',
$rule->test('2000-10-02 00:00:01'),
);

isSame(
'The date interval of the value "<c>qwerty</c>" is ' .
'<red>Can\'t parse date interval: qwerty</red>, ' .
Expand Down

0 comments on commit 865d30a

Please sign in to comment.