{"id":36255735,"url":"https://github.com/rauwebieten/twig-humanizer-extension","last_synced_at":"2026-01-11T07:37:28.512Z","repository":{"id":62533469,"uuid":"165889067","full_name":"rauwebieten/twig-humanizer-extension","owner":"rauwebieten","description":"A twig extension for the coduo/php-humanizer library","archived":false,"fork":false,"pushed_at":"2019-01-23T08:59:14.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-18T04:14:21.532Z","etag":null,"topics":["humanizer","php","twig","twig-extension"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rauwebieten.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-15T16:54:27.000Z","updated_at":"2020-01-22T19:12:22.000Z","dependencies_parsed_at":"2022-11-02T15:15:43.728Z","dependency_job_id":null,"html_url":"https://github.com/rauwebieten/twig-humanizer-extension","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/rauwebieten/twig-humanizer-extension","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rauwebieten%2Ftwig-humanizer-extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rauwebieten%2Ftwig-humanizer-extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rauwebieten%2Ftwig-humanizer-extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rauwebieten%2Ftwig-humanizer-extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rauwebieten","download_url":"https://codeload.github.com/rauwebieten/twig-humanizer-extension/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rauwebieten%2Ftwig-humanizer-extension/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28297963,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T04:44:51.577Z","status":"ssl_error","status_checked_at":"2026-01-11T04:44:44.232Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["humanizer","php","twig","twig-extension"],"created_at":"2026-01-11T07:37:27.987Z","updated_at":"2026-01-11T07:37:28.489Z","avatar_url":"https://github.com/rauwebieten.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Twig Humanizer Extension\n\n[![Build Status](https://travis-ci.org/rauwebieten/twig-humanizer-extension.svg?branch=master)](https://travis-ci.org/rauwebieten/twig-humanizer-extension)\n[![Maintainability](https://api.codeclimate.com/v1/badges/5143e3f5b20f57a3084d/maintainability)](https://codeclimate.com/github/rauwebieten/twig-humanizer-extension/maintainability)\n[![codecov](https://codecov.io/gh/rauwebieten/twig-humanizer-extension/branch/master/graph/badge.svg)](https://codecov.io/gh/rauwebieten/twig-humanizer-extension)\n[![StyleCI](https://github.styleci.io/repos/165889067/shield?branch=master)](https://github.styleci.io/repos/165889067)\n![](https://img.shields.io/github/issues/rauwebieten/twig-humanizer-extension.svg)\n![](https://img.shields.io/github/license/rauwebieten/twig-humanizer-extension.svg)\n\nA [Twig extension](https://github.com/twigphp/Twig)\nfor the [PHP Humanizer library](https://github.com/coduo/php-humanizer)\n\nUse the humanizer functions from the coduo/php-humanizer library in your Twig templates.\n\n## Installation\n\n```\ncomposer require rauwebieten/twig-humanizer-extension\n```\n\n## Available filters\n\nAll filters are underscored, and prefixed:\n\n- humanizer_humanize\n- humanizer_truncate\n- humanizer_truncate_html\n- humanizer_ordinalize\n- humanizer_ordinal\n- humanizer_to_roman\n- humanizer_from_roman\n- humanizer_binary_suffix\n- humanizer_precise_binary_suffix\n- humanizer_metric_suffix\n- humanizer_metric_suffix\n- humanizer_oxford\n- humanizer_difference\n- humanizer_precise_difference\n\nSee the [PHP Humanizer documentation](https://github.com/coduo/php-humanizer) for details.\n\n## Example usage\n\n```twig,html\n\u003cp\u003e\n    1 to 12 in roman:\n    {% for i in 1..12 %}\n        {{ i|humanizer_to_roman }}\n    {% endfor %}\n\u003c/p\u003e\n\u003cp\u003e\n    Roman VI = {{ 'VI'|humanizer_from_roman }}\n\u003c/p\u003e\n\u003cp\u003e\n    1024 bytes = {{ 1024|humanizer_binary_suffix }}\u003cbr\u003e\n    1024 bytes = {{ 1024|humanizer_precise_binary_suffix(2) }}\n\u003c/p\u003e\n\u003cp\u003e\n    This article was posted\n    {{ date(\"now\")|humanizer_difference(date(\"2014-04-24\")) }}\n\u003c/p\u003e\n\u003cp\u003e\n    {{ ['Michal', 'Norbert', 'Lukasz', 'Pawel']|humanizer_oxford(2) }}\n\u003c/p\u003e\n\u003cp\u003e\n    1240 metric = {{ 1240|humanizer_metric_suffix }}\n\u003c/p\u003e\n\u003cp\u003e\n    first: 1{{ 1|humanizer_ordinal }}\u003cbr\u003e\n    first: {{ 1|humanizer_ordinalize }}\n\u003c/p\u003e\n\u003cp\u003e\n    {{ 'Lorem ipsum dolorem si amet, lorem ipsum. Dolorem sic et nunc.'|humanizer_truncate(8,'...') }}\n\u003c/p\u003e\n{{ '\u003cp\u003e\u003cb\u003eHyperText Markup Language\u003c/b\u003e, commonly referred to as \u003cb\u003eHTML\u003c/b\u003e\u003c/p\u003e'|humanizer_truncate_html(3)|raw }}\n{{ '\u003cp\u003e\u003cb\u003eHyperText Markup Language\u003c/b\u003e, commonly referred to as \u003cb\u003eHTML\u003c/b\u003e\u003c/p\u003e'|humanizer_truncate_html(3,'\u003cb\u003e')|raw }}\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frauwebieten%2Ftwig-humanizer-extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frauwebieten%2Ftwig-humanizer-extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frauwebieten%2Ftwig-humanizer-extension/lists"}