PHPackages                             kazeeem/flexible-countdown - 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. kazeeem/flexible-countdown

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

kazeeem/flexible-countdown
==========================

This library creates a countdown timer from a date passed to it and it provides very flexible options you can use to format it.

v1.0.0(4y ago)15MITHTML

Since Nov 9Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Kazeeem/flexible-countdown)[ Packagist](https://packagist.org/packages/kazeeem/flexible-countdown)[ RSS](/packages/kazeeem-flexible-countdown/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

 [![Flexible Countdown](https://camo.githubusercontent.com/2c8203e17777b4e363df13e5847b3e6289465b43c3edeef1da45ea25f6d7e331/68747470733a2f2f636f64696e676b617a2e636f6d2e6e672f696d616765732f636f756e74646f776e2e676966)](https://codingkaz.com.ng)
 Flexible Countdown

===========================================================================================================================================================================================================================================================================

[](#--------flexible-countdown--)

#### Flexible Countdown is a special countdown timer built using [DayJs Library](https://day.js.org/).

[](#flexible-countdown-is-a-special-countdown-timer-built-using-dayjs-library)

 [ ![](https://camo.githubusercontent.com/5e165d5cdcf76b3852aba8dce84a44849489ef49e31b1937049486824990ef19/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f4b617a6565656d2f666c657869626c652d636f756e74646f776e3f6c6162656c3d4c617465737425323052656c65617365) ](https://img.shields.io/github/v/release/Kazeeem/flexible-countdown?label=Latest%20Release) [ ![](https://camo.githubusercontent.com/5543e07161c7edab12660ab0479d5b0baff5c033c4f46c4fd8434cb39bcac758/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f4b617a6565656d2f666c657869626c652d636f756e74646f776e) ](https://img.shields.io/github/last-commit/Kazeeem/flexible-countdown) [ ![](https://camo.githubusercontent.com/3ce7849cd7a2be186eb44f3659b6aa19a8e517ff06a30186be413499ce520d2c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f4b617a6565656d2f666c657869626c652d636f756e74646f776e3f7374796c653d736f6369616c) ](https://img.shields.io/github/forks/Kazeeem/flexible-countdown?style=social) [ ![](https://camo.githubusercontent.com/ead7514f3c81afa786c8526ed07421b8af3534d1770267715922dac57f54d25e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4b617a6565656d2f666c657869626c652d636f756e74646f776e) ](https://img.shields.io/github/license/Kazeeem/flexible-countdown)

[![made-with-javascript](https://camo.githubusercontent.com/422f0cbff47d3706fda18ae57bf62f4ced744635f019eded777f43b6f005c3e4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d616465253230776974682d4a6176615363726970742d3166343235662e737667)](https://www.javascript.com)

 [Key Features](#key-features) • [How To Use](#how-to-use) • [Credits](#credits) • [License](#license)

Key Features
------------

[](#key-features)

- Locale support
    - You can specify the time in your timezone.
- Action to perform when timer elapses
    - You could either display a message or reload the page when the time reaches zero.
- Countdown in various formats. (i.e Year, months, weeks, days, hour, minutes and seconds.
- Easy to modify.

How To Use
----------

[](#how-to-use)

To clone and use this plugin, you'll need [Jquery 3.6.0 and above](https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js)

```
# Clone this repository
$ git clone https://github.com/Kazeeem/flexible-countdown OR
$ you could install it via composer
* composer require kazeeem/flexible-countdown

# Locate the flexible-countdown.js file which will be found in src/assets/js
$ Make sure the flexible-countdown.js file is placed below your jquery.
```

[![screenshot](https://camo.githubusercontent.com/2c28dd736212e5c79fd21e82302e04490599187e1d2c996fee3be78d35dd63d0/68747470733a2f2f636f64696e676b617a2e636f6d2e6e672f696d616765732f636172626f6e2e706e67)](https://camo.githubusercontent.com/2c28dd736212e5c79fd21e82302e04490599187e1d2c996fee3be78d35dd63d0/68747470733a2f2f636f64696e676b617a2e636f6d2e6e672f696d616765732f636172626f6e2e706e67)

You can use the plugin as it is in the sample above
===================================================

[](#you-can-use-the-plugin-as-it-is-in-the-sample-above)

However, there are some optional parameters you may want to use as well:

- expiry\_message
    - This is the message you may want to display when the timer reaches zero. If this value is not passed, the default message is "Time Up"
- reload\_page
    - This takes the value of true or false. It reloads the page when the countdown reaches zero.
- suffix
    - This also takes the value of true or false. It will display the letters of the time beside the individual numbers
- show\_days
    - By default, the timer shows Hour, minutes and seconds but if you want it to show the value of remaining days, you can set this to true
- show\_weeks
    - If you want to show remaining weeks.
- show\_months
    - If you want to show remaining months.
- show\_years
    - If you want to show remaining year.
- local
    - You can specify the timezone you want the counter to use. By default, it is set to Africa/Lagos.

Full Sample Code
================

[](#full-sample-code)

[![screenshot](https://camo.githubusercontent.com/6e6b06f8f75dc8d87c2a5d45d5b6e0c53c8ab471740285f93dea84e7de1302fe/68747470733a2f2f636f64696e676b617a2e636f6d2e6e672f696d616765732f636172626f6e312e706e67)](https://camo.githubusercontent.com/6e6b06f8f75dc8d87c2a5d45d5b6e0c53c8ab471740285f93dea84e7de1302fe/68747470733a2f2f636f64696e676b617a2e636f6d2e6e672f696d616765732f636172626f6e312e706e67)

Credits
-------

[](#credits)

This plugin uses the following libraries:

- [Dayjs](https://day.js.org/) and its plugins (Timezone and Duration).

License
-------

[](#license)

MIT

---

> [codingkaz.com.ng](https://codingkaz.com.ng) · GitHub [@Kazeeem](https://github.com/Kazeeem) · Twitter [@Kazeeem\_A](https://twitter.com/Kazeeem_A)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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

1641d ago

Major Versions

v0.5 → v1.0.02021-11-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/0f469980a9c6588ca4d33df6f702fb52473f71a8cb368e7a106fb458cafb82da?d=identicon)[Kazeeem](/maintainers/Kazeeem)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/kazeeem-flexible-countdown/health.svg)

```
[![Health](https://phpackages.com/badges/kazeeem-flexible-countdown/health.svg)](https://phpackages.com/packages/kazeeem-flexible-countdown)
```

###  Alternatives

[t3docs/examples

This extension packages a number of code examples from the Core Documentation.

3120.2k](/packages/t3docs-examples)

PHPackages © 2026

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