From b7324f4eef41a62105d1342ec7805750895e8a47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20S=C3=B6derlind?= Date: Mon, 2 Nov 2020 17:19:51 +0100 Subject: [PATCH] add tests for new trunc methods (Quarter) --- stdlib/Dates/test/adjusters.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stdlib/Dates/test/adjusters.jl b/stdlib/Dates/test/adjusters.jl index 3caf7ba5497c2..145db53785502 100644 --- a/stdlib/Dates/test/adjusters.jl +++ b/stdlib/Dates/test/adjusters.jl @@ -8,10 +8,12 @@ using Dates @testset "trunc" begin dt = Dates.Date(2012, 12, 21) @test trunc(dt, Dates.Year) == Dates.Date(2012) + @test trunc(dt, Dates.Quarter) == Dates.Date(2012, 10) @test trunc(dt, Dates.Month) == Dates.Date(2012, 12) @test trunc(dt, Dates.Day) == Dates.Date(2012, 12, 21) dt = Dates.DateTime(2012, 12, 21, 16, 30, 20, 200) @test trunc(dt, Dates.Year) == Dates.DateTime(2012) + @test trunc(dt, Dates.Quarter) == Dates.DateTime(2012, 10) @test trunc(dt, Dates.Month) == Dates.DateTime(2012, 12) @test trunc(dt, Dates.Day) == Dates.DateTime(2012, 12, 21) @test trunc(dt, Dates.Hour) == Dates.DateTime(2012, 12, 21, 16)