PHPackages                             php81\_bc/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. php81\_bc/strftime

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

php81\_bc/strftime
==================

Locale-formatted strftime using IntlDateFormatter (PHP 8.1 compatible)

0.7.6(1y ago)411.4M↓15.4%12[1 issues](https://github.com/alphp/strftime/issues)9MITPHPPHP &gt;=7.1.0

Since Mar 13Pushed 12mo ago7 watchersCompare

[ Source](https://github.com/alphp/strftime)[ Packagist](https://packagist.org/packages/php81_bc/strftime)[ RSS](/packages/php81-bc-strftime/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (22)Used By (9)

[![GitHub Workflow](https://github.com/alphp/strftime/actions/workflows/php.yml/badge.svg)](https://github.com/alphp/strftime/actions/workflows/php.yml)[![GitHub license](https://camo.githubusercontent.com/56ebcf08338078dbaebcd4333463904bdd54fec8363a16b0833808bfce6b0d97/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f616c7068702f7374726674696d65)](https://github.com/alphp/strftime/blob/master/LICENSE)[![GitHub release](https://camo.githubusercontent.com/f9f48609313aaca73f6811f5a2c6b4f88270bbac045153fb76a8b0dfbdabfc3e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f616c7068702f7374726674696d65)](https://github.com/alphp/strftime/releases)[![Packagist](https://camo.githubusercontent.com/629f1f1104b93265ae811b99bae4acabdf3155542ea6120525bcee24ab66737e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70687038315f62632f7374726674696d65)](https://packagist.org/packages/php81_bc/strftime)[![Packagist Downloads](https://camo.githubusercontent.com/e6cc4fd7a6000b196c6b302d5a7ca59095888ae42021d41da6e79dd9eb18702c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70687038315f62632f7374726674696d65)](https://packagist.org/packages/php81_bc/strftime/stats)[![GitHub issues](https://camo.githubusercontent.com/cd30e233d6f2adc0287a8c62041ac74e1a1601906625046916d492953abcf70d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f616c7068702f7374726674696d65)](https://github.com/alphp/strftime/issues)[![GitHub forks](https://camo.githubusercontent.com/92885bfb5e2047eb690c10b9f81f2611bf2f8dc72f4da92bd155d24f2bd48350/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f616c7068702f7374726674696d65)](https://github.com/alphp/strftime/network)[![GitHub stars](https://camo.githubusercontent.com/7ff57b57bfd210eaa3def64617dd0cbdc15bddd85a42ff216b8acfc468a96a81/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f616c7068702f7374726674696d65)](https://github.com/alphp/strftime/stargazers)

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: [BohwaZ](https://bohwaz.net/)

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 php81\_bc/strftime package to your project:

    ```
      composer require php81_bc/strftime
    ```
- Load the function PHP81\_BC\\strftime in your project

    ```
