From dcfcb582820be684b3faa84637c6b13ecebf42be Mon Sep 17 00:00:00 2001 From: Andreu Vall Date: Mon, 18 Nov 2024 20:56:26 +0100 Subject: [PATCH] Add the DATETIME13 format to the list of SAS datetime formats (#44) --- data/datetime13.xpt | Bin 0 -> 960 bytes src/datetime.jl | 2 +- test/readstat.jl | 4 ++++ 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 data/datetime13.xpt diff --git a/data/datetime13.xpt b/data/datetime13.xpt new file mode 100644 index 0000000000000000000000000000000000000000..2a33ba8133a5ac2e907bde346712654024ee89c2 GIT binary patch literal 960 zcmd5*u@1r@6r`JrzhIt;lY;@pCU&ERq)nu4fEYXZ|9>GuiL`07>f#MN4)U(tK}*57 zP@qK7D8BVLSGi)UgEHP*d*GJ<&`iSvQMGaaryX_c*OcA}Zj~bw115EI+0zWC89iqB zFy<32A1w_$^?s$0xy@jnUy_Cd2*snGUXSZSwMNa;3u>-DbCVrshB@vg|D0dVq|opD zl7Z2l0H6dRv_J_r#%j#JN*jtWl@w@c`z=DJXWxxMBd$~LrOEvpAMDNiKg4R|4i|sp Gm-!u4d!dN{ literal 0 HcmV?d00001 diff --git a/src/datetime.jl b/src/datetime.jl index 353c82b..c8acd00 100644 --- a/src/datetime.jl +++ b/src/datetime.jl @@ -28,7 +28,7 @@ const sas_date_formats = [ "E8601DA", "E8601DN" ] const sas_datetime_formats = [ - "DATETIME", "DATETIME18", "DATETIME19", "DATETIME20", "DATETIME21", + "DATETIME", "DATETIME13", "DATETIME18", "DATETIME19", "DATETIME20", "DATETIME21", "DATETIME22", "TOD", "E8601DT", "E8601DX", "E8601DZ", "E8601LX", ] const sas_time_formats = [ diff --git a/test/readstat.jl b/test/readstat.jl index 561dbd1..2c3522c 100644 --- a/test/readstat.jl +++ b/test/readstat.jl @@ -428,4 +428,8 @@ end @test m.file_format_version == 5 @test m.table_name == "SAMPLE" @test m.file_ext == ".xpt" + + xpt = "$(@__DIR__)/../data/datetime13.xpt" + d = readstat(xpt) + @test isa(only(d.DTTEST), DateTime) end