Skip to content

Commit

Permalink
Add the DATETIME13 format to the list of SAS datetime formats (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreuvall authored Nov 18, 2024
1 parent 1a6d601 commit dcfcb58
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Binary file added data/datetime13.xpt
Binary file not shown.
2 changes: 1 addition & 1 deletion src/datetime.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
4 changes: 4 additions & 0 deletions test/readstat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit dcfcb58

Please sign in to comment.