PHPackages                             sergioccrr/datetimespanish - 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. sergioccrr/datetimespanish

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

sergioccrr/datetimespanish
==========================

Translate textual date representations into Spanish

v1.0(4y ago)286MITPHPPHP &gt;=7.4.0CI failing

Since Oct 24Pushed 4y ago1 watchersCompare

[ Source](https://github.com/sergioccrr/datetimespanish)[ Packagist](https://packagist.org/packages/sergioccrr/datetimespanish)[ Docs](https://github.com/sergioccrr/datetimespanish)[ RSS](/packages/sergioccrr-datetimespanish/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (2)Used By (0)

DateTimeSpanish
---------------

[](#datetimespanish)

A simple extension of the native [DateTime](https://www.php.net/manual/en/class.datetime.php) class that allows to represent months and days of the week in Spanish.

### Motivation

[](#motivation)

You can achieve this with the `setlocale` function, but it relies on you having the locale installed on your system, plus to being an ugly global setting.

### Example

[](#example)

```
