PHPackages                             mmnijas/strftime - 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. [Localization &amp; i18n](/categories/localization)
4. /
5. mmnijas/strftime

ActiveLibrary[Localization &amp; i18n](/categories/localization)

mmnijas/strftime
================

A Laravel package that provides strftime functionality compatible with PHP 8.1+. This package will serve as a drop-in replacement, leveraging IntlDateFormatter to provide locale-aware date and time formatting, similar to strftime

0.1.1(1y ago)031MITPHPPHP &gt;=8.1

Since Sep 19Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mmnijas/strftime)[ Packagist](https://packagist.org/packages/mmnijas/strftime)[ RSS](/packages/mmnijas-strftime/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

strftime
========

[](#strftime)

Locale-formatted strftime using IntlDateFormatter (PHP 8.1 compatible)

This provides a cross-platform alternative to strftime() for when it will be removed from PHP.

Note that output can be slightly different between libc sprintf and this function as it is using ICU.

Original code:

Original autor: [Fernando Herrero](https://github.com/alphp)

Table of contents
=================

[](#table-of-contents)

- [Requirements](#requirements)
- [Installation](#installation)
    - [Composer install](#composer-install)
    - [Manual install](#manual-install)
- [Usage](#usage)
    - [Original use](#original-use)
- [Formats](#formats)
    - [Day](#day)
    - [Week](#week)
    - [Month](#month)
    - [Year](#year)
    - [Time](#time)
    - [Time and Date Stamps](#time-and-date-stamps)
    - [Miscellaneous](#miscellaneous)

Requirements
------------

[](#requirements)

- PHP &gt;= 7.1.0
- ext-intl ([Internationalization extension ICU](https://www.php.net/manual/en/book.intl.php))

[TOC](#table-of-contents)

Installation
------------

[](#installation)

### Composer install

[](#composer-install)

You can install this plugin into your application using [composer](https://getcomposer.org):

- Add mmnijas/strftime package to your project:

    ```
      composer require mmnijas/strftime
    ```
- Load the function MmNijas\\strftime in your project

    ```
