In the Julia 1.0 documentation for the Dates package it says for the Dates.dayofweek function:
"Return the day of the week as an Int64 with 1 = Monday, 2 = Tuesday, etc.."
Example from documentation after adding using Dates:
julia> using Dates
julia> Dates.dayofweek(Date("2000-01-01"))
6
Example for Monday, 9/10/2018:
julia> Dates.dayofweek(Date("2018-09-10"))
1
I do not see a way to set Sunday=1, Monday=2, etc.
Any suggestions?
EDIT: The accepted answer works great and is illustrated below in contrast to the code above:
julia> my_dayofweek(Date("2018-09-10"))
2