PHPackages                             teraone/twig-strftime-extension - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. teraone/twig-strftime-extension

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

teraone/twig-strftime-extension
===============================

use strftime function in twig

1.2.2(2y ago)160.7k↓71.1%5[1 PRs](https://github.com/teraone/twig-strftime-extension/pulls)MITPHPCI passing

Since Mar 18Pushed 5mo ago4 watchersCompare

[ Source](https://github.com/teraone/twig-strftime-extension)[ Packagist](https://packagist.org/packages/teraone/twig-strftime-extension)[ RSS](/packages/teraone-twig-strftime-extension/feed)WikiDiscussions master Synced yesterday

READMEChangelog (7)Dependencies (2)Versions (8)Used By (0)

Twig strftime Filter
====================

[](#twig-strftime-filter)

Use strftime in twig

```
{{ now|date_modify("+3 day")|strftime('%A') }} //-> Monday (if today is thursday at least :) )

{{ date()|strftime('%I:%M:%S %p') }} //-> Display the current time

{{ '2017-12-01'|strftime('%d %B %Y') }} //-> Accept string filtering (compatible with strtotime)
```

Installation
============

[](#installation)

```
composer require teraone/twig-strftime-extension
```

Add the extension to your twig environment

```
// set your locale
setlocale(LC_ALL, 'de_DE');
$twig->addExtension(new Teraone\Twig\Extension\StrftimeExtension());

// optional: set Timezone
$twig->getExtension('core')->setTimezone('Europe/Berlin');
```

For the full list of supported time formats have a look at the [PHP strftime documentation](http://php.net/manual/en/function.strftime.php)

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance49

Moderate activity, may be stable

Popularity32

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~566 days

Recently: every ~572 days

Total

6

Last Release

927d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/34bb3ed24e78987d5f89cff121c51fd55070a90f2887eba16583a78cb77acb50?d=identicon)[teraone](/maintainers/teraone)

---

Top Contributors

[![CaptainQuirk](https://avatars.githubusercontent.com/u/993420?v=4)](https://github.com/CaptainQuirk "CaptainQuirk (1 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![KoenPasman](https://avatars.githubusercontent.com/u/1674580?v=4)](https://github.com/KoenPasman "KoenPasman (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/teraone-twig-strftime-extension/health.svg)

```
[![Health](https://phpackages.com/badges/teraone-twig-strftime-extension/health.svg)](https://phpackages.com/packages/teraone-twig-strftime-extension)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
