Skip to content

EDTF Humanizer Twig Extension #199

@DiegoPino

Description

@DiegoPino

What?

Yep, make dates human readable. This is a quick one. Will add with another open pull I have together.

Code is:

$validator = \EDTF\EdtfFactory::newValidator();

if ($validator->isValidEdtf($thestringcomingfromthetwigextensionargument)) {
$humanizer = \EDTF\EdtfFactory::newHumanizerForLanguage( '$len' ); // 'en'
return $humanizer->humanize($edtfValue)
}

@alliomeria @karomabiles

Metadata

Metadata

Assignees

Labels

TwigTwig template processingTwig ExtensionMake those flowers reach the sunenhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions