Changing the Week Start Day in Movable Type
We were working on a site for a client who wanted to send out a HTML newsletter every Wednesday to their customers. We decided to use Movable Type to generate the weekly newsletter. We set the archive type to weekly and generated a weekly archive template. Then using PHP we sent out the HTML page in an email.
Each new entry added in the week would make up the weekly newsletter. The only problem was that the weeks within Movable type start on a Sunday. Therefore we had to wait until Monday to start the new newsletter.
After some searching on the Movable Type forum I came across a solution that required some alterations to the Movable Type application. But the solution was only to change the start of the week to a Monday. So here is my solution for starting the weekly archives on whatever day you decide.
in lib/MT/ConfigMgr.pm
$mgr->define('NoLocking', Default => 0);
$mgr->define('NoHTMLEntities', Default => 0);
$mgr->define('WeekStartsOnNewDay', Default => 0);
$mgr->define('NoPlacementCache', Default => 0);
In lib/MT/Util.pm
$days += $y >> 2; $days += $In_Year[$leap][$m-1] + $d; #$days % 7; ($days + MT::ConfigMgr->instance->WeekStartsOnNewDay) % 7;
In mt.cfg
# Week Starts On New Day # 6 - Sat Sun Mon... # 5 - Fri Sat Sun ... # 4 - Thu Fri Sat ... # 3 - Wed Thu Fri ... # 2 - Tue Wed Thu... # 1 - Mon Tue Wen ... # 0 - Sun Mon Tue ...WeekStartsOnNewDay 3