site-libsoc/Server/config/initializers/converters.jl

6 lines
208 B
Julia
Raw Permalink Normal View History

2023-06-15 01:41:54 +07:00
using Dates
import Base.convert
convert(::Type{Int}, v::SubString{String}) = parse(Int, v)
convert(::Type{Float64}, v::SubString{String}) = parse(Float64, v)
convert(::Type{Date}, s::String) = parse(Date, s)