smichaelsen / fluid-viewhelper-timespan
There is no license information available for the latest version (2.0.0) of this package.
TimeSpanViewHelper for Fluid
Package info
github.com/smichaelsen/fluid-viewhelper-timespan
Type:typo3-cms-extension
pkg:composer/smichaelsen/fluid-viewhelper-timespan
2.0.0
2024-10-29 09:38 UTC
Requires
- php: ^8.0
- typo3/cms-core: ^12.4 || ^13.4
This package is auto-updated.
Last update: 2026-03-12 11:18:21 UTC
README
This package serves a ViewHelper for the TYPO3 templating engine Fluid.
Installation
- Composer:
composer require smichaelsen/fluid-viewhelper-timespan
- Copy the file
Resources/Private/Language/locallang.xlfto your TYPO3 extension (or merge the contents if you already have a locallang file) and adjust/translate the labels.
Usage example
<html data-namespace-typo3-fluid="true" xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers" xmlns:vhts="http://typo3.org/ns/Smichaelsen/FluidViewHelperTimespan/ViewHelpers">
User {user.name} registered {user.crdate -> vhts:timeSpan(limitUnits:'2', extensionName: 'MyExtension')}.
</html>
Output is something like:
User Sebastian registered 3 months 7 days ago.