Closed JJJ closed 3 years ago
The second parameter in build_mysql_week()
already accepts $start_of_week
, so my thought is that Queries\Date
could add start_of_week
as a first-order query argument, akin to column
, compare
, and relation
.
PR imminent.
In 87fa6d5, Berlin brought 2 WordPress core functions into
Queries\Date
public methods.Now, inside of
build_mysql_week()
, there is aget_option( 'start_of_week' )
call that Sugar Calendar would benefit from being able to more easily override.The purpose of this
get_option()
call is to ensure thatWEEK()
MySQL statements on specific columns use the correct the "offset" orINTERVAL
andDAY
as needed. Sugar Calendar uses its ownsc_start_of_week
setting, which does fallback tostart_of_week
already, so it's not possible to filter it the other direction without creating an infinite loop situation.