Add DateTime option to Range function

Signed-off-by: davidarendsen <davidarendsen@hey.com>
This commit is contained in:
davidarendsen 2022-08-12 15:49:25 +00:00
commit 15a3f8fcde
6 changed files with 71 additions and 11 deletions

View file

@ -18,4 +18,13 @@ final class FormattersTest extends TestCase {
$this->assertEquals($expected, Formatters::toFluxArrayString($array));
}
public function testDateTimeToString()
{
$dateTime = new DateTime('2022-08-12 17:31:00');
$expected = 'time(v: 2022-08-12T17:31:00Z)';
$this->assertEquals($expected, Formatters::dateTimeToString($dateTime));
}
}