PHPackages                             openlss/func-time - 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. openlss/func-time

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

openlss/func-time
=================

Time helper functions

0.0.8(13y ago)01.9k1LGPL-3.0+PHPPHP &gt;=5.3.2

Since Mar 23Pushed 13y ago1 watchersCompare

[ Source](https://github.com/nullivex/func-time)[ Packagist](https://packagist.org/packages/openlss/func-time)[ Docs](http://openlss.org)[ RSS](/packages/openlss-func-time/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (10)Used By (1)

func-time
=========

[](#func-time)

Date and Time functions

Usage
-----

[](#usage)

```
$timestamp = time()-3600;
$ago = age($timestamp); //returns 1 hour

$timestamp = time()+3600
$in = future_age($timestamp); //returns 1 hour

$time = timestamp()-7200;
$hours = hours($time); //returns 2
```

Reference
---------

[](#reference)

### age($tm,$end=false)

[](#agetmendfalse)

- $tm Timestamp to use
- $end Timestamp to use as NOW otherwise defaults to time()

### future\_age($tm,$end=false)

[](#future_agetmendfalse)

Same prototype as age() but works on a future time

### hours($tm,$inc=1)

[](#hourstminc1)

- $tm The range in seconds
- $inc Increment eg: 2 = every half hour Returns the number of hours to the inc power

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% 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

8

Last Release

4836d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/83c8e9d55e3ebafb0621a441a51af8f551f61a274fde5400459a29cc320b7b75?d=identicon)[nullivex](/maintainers/nullivex)

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

---

Top Contributors

[![nullivex](https://avatars.githubusercontent.com/u/2321375?v=4)](https://github.com/nullivex "nullivex (6 commits)")[![doyjo](https://avatars.githubusercontent.com/u/3947855?v=4)](https://github.com/doyjo "doyjo (1 commits)")

---

Tags

timeagehours agofuture age

### Embed Badge

![Health badge](/badges/openlss-func-time/health.svg)

```
[![Health](https://phpackages.com/badges/openlss-func-time/health.svg)](https://phpackages.com/packages/openlss-func-time)
```

###  Alternatives

[symfony/clock

Decouples applications from the system clock

434192.7M336](/packages/symfony-clock)[knplabs/knp-time-bundle

Making your dates and durations look sensible and descriptive

6239.3M51](/packages/knplabs-knp-time-bundle)[league/period

Time range API for PHP

7335.7M22](/packages/league-period)[wapmorgan/morphos

A morphological solution for Russian and English language written completely in PHP. Provides classes to inflect personal names, geographical names, decline and pluralize nouns, generate cardinal and ordinal numerals, spell out money amounts and time.

8261.3M7](/packages/wapmorgan-morphos)[brick/date-time

Date and time library

3623.6M94](/packages/brick-date-time)[aeon-php/calendar

PHP type safe, immutable calendar library

20410.2M16](/packages/aeon-php-calendar)

PHPackages © 2026

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