File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ function str2zoneddatetime(str::String)
24
24
return ZonedDateTime (str2datetime (str), localzone ())
25
25
throw (OpenAPIException (" Unsupported ZonedDateTime format: $str " ))
26
26
end
27
+ str2zoneddatetime (datetime:: DateTime ) = ZonedDateTime (datetime, localzone ())
27
28
28
29
str2datetime (bytes:: Vector{UInt8} ) = str2datetime (String (bytes))
29
30
function str2datetime (str:: String )
@@ -36,6 +37,7 @@ function str2datetime(str::String)
36
37
end
37
38
throw (OpenAPIException (" Unsupported DateTime format: $str " ))
38
39
end
40
+ str2datetime (datetime:: DateTime ) = datetime
39
41
40
42
str2date (bytes:: Vector{UInt8} ) = str2date (String (bytes))
41
43
function str2date (str:: String )
@@ -48,3 +50,4 @@ function str2date(str::String)
48
50
end
49
51
throw (OpenAPIException (" Unsupported Date format: $str " ))
50
52
end
53
+ str2date (date:: Date ) = date
You can’t perform that action at this time.
0 commit comments