static function getDayHeadersForWeek($start_date) {
$dayHeaders = array();
$objDate = new DateAndTime(DB_DATEFORMAT, $start_date);
- $dayHeaders['day_header_0'] = (string)$objDate->getDate(); // It returns an int on first call. Why?
+ $dayHeaders['day_header_0'] = (string) $objDate->getDate(); // It returns an int on first call.
+ if (strlen($dayHeaders['day_header_0']) == 1) // Which is an implementation detail of DateAndTime class.
+ $dayHeaders['day_header_0'] = '0'.$dayHeaders['day_header_0']; // Add a 0 for single digit day.
$objDate->incDay();
- $dayHeaders['day_header_1'] = $objDate->getDate();
+ $dayHeaders['day_header_1'] = $objDate->getDate(); // After incDay it returns a string with leading 0, when necessary.
$objDate->incDay();
$dayHeaders['day_header_2'] = $objDate->getDate();
$objDate->incDay();
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.13.3.3695 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.13.0.3696 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
$table = new Table('week_durations');
// $table->setIAScript('markModified'); // TODO: write a script to mark table or particular cells as modified.
$table->setTableOptions(array('width'=>'100%','cellspacing'=>'1','cellpadding'=>'3','border'=>'0'));
-$table->setHeaderOptions(array('align'=>'center')); // TODO: use a class and CSS instead, perhaps a separate class for footer.
-$table->setRowOptions(array('valign'=>'top','class'=>'tableHeader'));
+$table->setRowOptions(array('class'=>'tableHeaderCentered'));
$table->setData($dataArray); // $durations_with_labels);
// Add columns to table.
$table->addColumn(new TableColumn('label', '', new LabelCellRenderer(), $dayTotals['label']));