View source for Action: TimeStamp

#||
||
Compatible with: !!(green)**R6.1**!!
Current version: 0.2

|{{toc numerate=1}} ||
||#

Uses IntlDateFormatter including timezone offset and DST.
see ((https://unicode-org.github.io/icu/userguide/format_parse/datetime/ ICU Dates and Times Patterns))

===Timestamp===
##~{{timestamp}}##

**~/action/timestamp.php**
%%(php)
<?php

$time		= time();
$pattern	= 'dd.MM.yyyy HH:mm'; // $this->db->date_format . ' ' . $this->db->time_format
$tpl->timestamp = $this->date_format($time, $pattern);
%%

**/action/template/timestamp.tpl**
%%(hl html)
[ ' timestamp ' ]
%%

===Calendar week===
##~{{cw}}##

**~/action/cw.php**
%%(php)
<?php

$time		= time();
$pattern	= 'ww';
$tpl->week = $this->date_format($time, $pattern);
%%

**/action/template/cw.tpl**
%%(hl html)
[ ' week ' ]
%%