Skip to content

Commit 8066de5

Browse files
committed
Remove use of old contains
1 parent e5b9d2b commit 8066de5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/api.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const MYSQL_DATETIME_FORMAT = Dates.DateFormat("yyyy-mm-dd HH:MM:SS.s")
7070

7171
mysql_time(str) = Dates.Time(map(x->parse(Int, x), split(str, ':'))...)
7272
mysql_date(str) = Dates.Date(str, MYSQL_DATE_FORMAT)
73-
mysql_datetime(str) = Dates.DateTime(contains(str, " ") ? str : "1970-01-01 " * str, MYSQL_DATETIME_FORMAT)
73+
mysql_datetime(str) = Dates.DateTime(occursin(" ", str) ? str : "1970-01-01 " * str, MYSQL_DATETIME_FORMAT)
7474
export mysql_time, mysql_date, mysql_datetime
7575

7676
function Base.convert(::Type{DateTime}, mtime::MYSQL_TIME)

0 commit comments

Comments
 (0)