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

ActiveLibrary

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 1mo 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 54% 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

4791d 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

[psr/clock

Common interface for reading the clock.

642332.9M343](/packages/psr-clock)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M119](/packages/cakephp-chronos)[jenssegers/date

A date library to help you work with dates in different languages

1.8k11.2M77](/packages/jenssegers-date)[symfony/clock

Decouples applications from the system clock

430168.9M205](/packages/symfony-clock)[nesbot/carbon

An API extension for DateTime that supports 281 different languages.

169661.4M4.7k](/packages/nesbot-carbon)[azuyalabs/yasumi

The easy PHP Library for calculating holidays

1.1k11.4M24](/packages/azuyalabs-yasumi)

PHPackages © 2026

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