受け取った曜日でスケジュールの開始曜日を変える

#*
+
+#set ($theDayStr = ${portlet.getPortletConfig().getInitParameter("z1a-rows")})
+##set ($theDayStr = "7")
+#set ($theDay = 0)
+$theDay.parseInt($theDayStr)
+$theDay = $theDay - 1
+#set ($weekOrder = ["$l10n.SCHEDULE_SUNDAY","$l10n.SCHEDULE_MONDAY","$l10n.SCHEDULE_TUSEDAY","$l10n.SCHEDULE_WEDNESDAY","$l10n.SCHEDULE_THURSDAY","$l10n.SCHEDULE_FRIDAY","$l10n.SCHEDULE_SATURDAY"])
+#set ($weekRevised = [])
+
+#foreach($dayOfWeek in $weekOrder)
+   $weekRevised.add($weekOrder.get($theDay))
+   $theDay = $theDay + 1
+   #if($weekOrder.size() <= $theDay)
+       $theDay = 0
 +  #end
 #end
+
+<tr>
+   #foreach($test in $weekRevised)
+       <th #if($velocityCount==1) class='sunday' #elseif($velocityCount==7) class='saturday' #end style="width:14.3%" nowrap="nowrap">$test</th>
+   #end
 </tr>
+*#