Action: TimeStamp
Compatible with: R6.1 Current version: 0.2 |
Uses IntlDateFormatter including timezone offset and DST.
see ICU Dates and Times Patterns
1. Timestamp
{{timestamp}}
/action/timestamp.php
<?php $time = time(); // global date & time pattern: $this->db->date_format . ' ' . $this->db->time_format or // localized date pattern: $this->date_format_pattern() . ' ' . $this->db->time_format $pattern = 'dd.MM.y HH:mm'; $tpl->timestamp = $this->date_format($time, $pattern);
/action/template/timestamp.tpl
[ ' timestamp ' ]
2. Calendar week
{{cw}}
/action/cw.php
<?php $time = time(); $pattern = 'ww'; $tpl->week = $this->date_format($time, $pattern);
/action/template/cw.tpl
[ ' week ' ]