PHPackages                             apie/date-value-objects - 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. apie/date-value-objects

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

apie/date-value-objects
=======================

Composer package of the apie library: date value objects

1.0.0.x-dev(11mo ago)07.5k4MITPHPPHP &gt;=8.3

Since Mar 18Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/apie-lib/date-value-objects)[ Packagist](https://packagist.org/packages/apie/date-value-objects)[ RSS](/packages/apie-date-value-objects/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (3)Used By (4)

[![](https://raw.githubusercontent.com/apie-lib/apie-lib-monorepo/main/docs/apie-logo.svg)](https://raw.githubusercontent.com/apie-lib/apie-lib-monorepo/main/docs/apie-logo.svg)

date-value-objects
==================

[](#date-value-objects)

[![Latest Stable Version](https://camo.githubusercontent.com/c640f65f86f2a72a8ce7c38e76ef008b2764ffd124ee99b34947035df8520634/68747470733a2f2f706f7365722e707567782e6f72672f617069652f646174652d76616c75652d6f626a656374732f76)](https://packagist.org/packages/apie/date-value-objects) [![Total Downloads](https://camo.githubusercontent.com/2b1cdbefa3f69a6a177ab49ee86445b936d87e3fe9cabca5688e32a2ae875479/68747470733a2f2f706f7365722e707567782e6f72672f617069652f646174652d76616c75652d6f626a656374732f646f776e6c6f616473)](https://packagist.org/packages/apie/date-value-objects) [![Latest Unstable Version](https://camo.githubusercontent.com/414d4a03a0b470b72d7528f166fafc14b9f8fbb77ce8e119cd4b4f2304f487c8/68747470733a2f2f706f7365722e707567782e6f72672f617069652f646174652d76616c75652d6f626a656374732f762f756e737461626c65)](https://packagist.org/packages/apie/date-value-objects) [![License](https://camo.githubusercontent.com/b1c6d3e78fb1a0a7a39b616b941764eceaf85919b1503fc309529731396f48a9/68747470733a2f2f706f7365722e707567782e6f72672f617069652f646174652d76616c75652d6f626a656374732f6c6963656e7365)](https://packagist.org/packages/apie/date-value-objects) [![PHP Composer](https://camo.githubusercontent.com/9314afa12df4f403107e1c76292fd041616103051156dfc87750f6ef8fc7d06c/68747470733a2f2f617069652d6c69622e6769746875622e696f2f70726f6a656374436f7665726167652f636f7665726167652d646174652d76616c75652d6f626a656374732e737667)](https://apie-lib.github.io/projectCoverage/date-value-objects/index.html)

[![PHP Composer](https://github.com/apie-lib/date-value-objects/actions/workflows/php.yml/badge.svg?event=push)](https://github.com/apie-lib/date-value-objects/actions/workflows/php.yml)

This package is part of the [Apie](https://github.com/apie-lib) library. The code is maintained in a monorepo, so PR's need to be sent to the [monorepo](https://github.com/apie-lib/apie-lib-monorepo/pulls)

Documentation
-------------

[](#documentation)

This package contains many Date-related value objects. Why do you want to use these value objects over DateTimeImmutable in PHP? The thing is that DateTime always contains days, months, years, minutes, seconds, hours, a timezone and microseconds. But in most cases we only use some.

By using these value objects over the PHP datetime objects we can tell if the date format we expect is actually using all these properties.

### Available classes

[](#available-classes)

***DateWithTimezone:*** contains years, months, days, hours, seconds and also timezones. They should be in the format as DateTime::ATOM as a standard.

***HourAndMinutes:*** contains a timestamp with only hours and minutes. It's still possible to call nextMinute 60 time or nextSecond 3600 time to advance an hour here.

***LocalDate:*** contains a date with the format in a local date format, for example '2002-12-31' for 31 december 2002.

***Time:*** contains a timestamp with only hours, minutes and seconds.

***UnixTimestamp:*** contains a Unix timestamp.

### Interfaces

[](#interfaces)

***WorksWithDays:***contains a list of methods to work with days.

***WorksWithMonths:***contains a list of methods to work with months. Internally it stores a un-normalized day value in case someone uses nextMonth() or previousMonth() too many times in a row.

***WorksWithTimeIntervals:***contains a list of methods to work with time periods.

***WorksWithYears:***contains a list of methods to work with year counting.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance52

Moderate activity, may be stable

Popularity20

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 52.9% 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 ~87 days

Total

2

Last Release

338d ago

### Community

Maintainers

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

---

Top Contributors

[![pjordaan](https://avatars.githubusercontent.com/u/2209895?v=4)](https://github.com/pjordaan "pjordaan (136 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (121 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/apie-date-value-objects/health.svg)

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

###  Alternatives

[easyrdf/easyrdf

EasyRdf is a PHP library designed to make it easy to consume and produce RDF.

62231.5M42](/packages/easyrdf-easyrdf)[functional-php/fantasy-land

Specification for interoperability of common algebraic structures in PHP

396.2M5](/packages/functional-php-fantasy-land)

PHPackages © 2026

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