getPersistenceJumpPredict = function(data, today, memory, horizon, params, ...)
{
#return gap between end of similar day curve and first day of tomorrow (in the past)
first_day = max(1, today-memory)
same_day = ifelse(hasArg("same_day"), list(...)$same_day, TRUE)
getPersistenceJumpPredict = function(data, today, memory, horizon, params, ...)
{
#return gap between end of similar day curve and first day of tomorrow (in the past)
first_day = max(1, today-memory)
same_day = ifelse(hasArg("same_day"), list(...)$same_day, TRUE)