PHPackages                             citripio/date - 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. citripio/date

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

citripio/date
=============

Date helpers for citripio websites

1.0.1(7y ago)0161MITPHP

Since Jun 20Pushed 7y ago3 watchersCompare

[ Source](https://github.com/citripio/date)[ Packagist](https://packagist.org/packages/citripio/date)[ RSS](/packages/citripio-date/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (3)Used By (0)

Date helpers for websites
=========================

[](#date-helpers-for-websites)

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

[](#installation)

Add this to your `composer.json`

```
{
    "require": {
        "citripio/date": "^1.0"
    }
}

```

Then:

```
require_once "./vendor/autoload.php";

$date_utils = new Citripio\Date(
    array(
        "lang" => "es",
    )
);

```

Methods
-------

[](#methods)

### is\_today()

[](#is_today)

Receives a PHP Date `date("Y-m-d H:i:s")`. Returns `true` if it's today.

### is\_yesterday()

[](#is_yesterday)

Receives a PHP Date `date("Y-m-d H:i:s")`. Returns `true` if it's yesterday.

### month()

[](#month)

Receives an integer representing a month of the year, returns its name.

### day()

[](#day)

Receives an integer representing a day of the week, returns its name.

### get\_date\_components()

[](#get_date_components)

Useful for composing headings and other strings with dates in them.

Receives a PHP Date `date("Y-m-d H:i:s")`. Returns an array containing:

- **date\_dow**: Day name. Same as `day()`
- **date\_day**: Day number, like the 20 in "April 20th"
- **date\_moy**: Month name. Dame as `month()`
- **date\_distance**: (today|yesterday|past)
- **ordinal**: Date number with an ordinal attached to it, for english dates. Eg: "20th", "3rd", "1st"

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~0 days

Total

2

Last Release

2885d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ad51cf07e41b00d24ac9af1e18fd16be1e9d85277a05b6edd0ab5146ae6f1e65?d=identicon)[alfredoreduarte](/maintainers/alfredoreduarte)

---

Top Contributors

[![alfredoreduarte](https://avatars.githubusercontent.com/u/4633753?v=4)](https://github.com/alfredoreduarte "alfredoreduarte (4 commits)")

### Embed Badge

![Health badge](/badges/citripio-date/health.svg)

```
[![Health](https://phpackages.com/badges/citripio-date/health.svg)](https://phpackages.com/packages/citripio-date)
```

###  Alternatives

[grgk/seo-analyzer

Seo Analyzer

683.0k](/packages/grgk-seo-analyzer)[phalapi/wechatmini

PhalApi 2.x 微信小程序扩展

121.1k](/packages/phalapi-wechatmini)

PHPackages © 2026

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