WackoWiki: Action: TimeStamp

https://wackowiki.org/doc     Version: 15 (05.02.2022 19:16)

Action: TimeStamp

Compatible with: R6.1
Current version: 0.2


Uses IntlDateFormatter including timezone offset and DST.
see ICU Dates and Times Patterns[link1]

1. Timestamp

{{timestamp}}

/action/timestamp.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
[ ' 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 ' ]