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)
2424 return ZonedDateTime (str2datetime (str), localzone ())
2525 throw (OpenAPIException (" Unsupported ZonedDateTime format: $str " ))
2626end
27+ str2zoneddatetime (datetime:: DateTime ) = ZonedDateTime (datetime, localzone ())
2728
2829str2datetime (bytes:: Vector{UInt8} ) = str2datetime (String (bytes))
2930function str2datetime (str:: String )
@@ -36,6 +37,7 @@ function str2datetime(str::String)
3637 end
3738 throw (OpenAPIException (" Unsupported DateTime format: $str " ))
3839end
40+ str2datetime (datetime:: DateTime ) = datetime
3941
4042str2date (bytes:: Vector{UInt8} ) = str2date (String (bytes))
4143function str2date (str:: String )
@@ -48,3 +50,4 @@ function str2date(str::String)
4850 end
4951 throw (OpenAPIException (" Unsupported Date format: $str " ))
5052end
53+ str2date (date:: Date ) = date
You can’t perform that action at this time.
0 commit comments