PHPackages                             webrium/pdate - 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. webrium/pdate

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

webrium/pdate
=============

Webrium persian date

1.0.1(1y ago)030Apache-2.0PHPPHP ^8

Since May 3Pushed 1y agoCompare

[ Source](https://github.com/webrium/pdate)[ Packagist](https://packagist.org/packages/webrium/pdate)[ RSS](/packages/webrium-pdate/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Persian Date
============

[](#persian-date)

pdate provides the ability to use Hijri dates and also convert Gregorian dates to Hijri dates and vice versa easily.
--------------------------------------------------------------------------------------------------------------------

[](#pdate-provides-the-ability-to-use-hijri-dates-and-also-convert-gregorian-dates-to-hijri-dates-and-vice-versa-easily)

Hijri calendar library is created based on jdf library

Install pdate
-------------

[](#install-pdate)

```
composer require webrium/pdate

```

```
use PDate\PDate;

PDate::new()->get();
// 1403-02-10 21-10-25

PDate::new()
   ->timestamp('1714390128')
   ->format('Y-m-d')
   ->get();
   // 1403-02-10
```

### Convert Date

[](#convert-date)

```
PDate::new()
   ->fromGregorian('2024-04-29')
   ->format('Y-m-d')
   ->get();
  // 1403-02-10

PDate::new()
   ->fromShamsi('1403-02-10')
   ->format('Y-m-d')
   ->getGregorian();
  // 2024-04-29
```

### Add Days and week and month to date

[](#add-days-and-week-and-month-to-date)

```
PDate::new()->now()->addDay(4)->get();
// 1403-02-14 21-10-25

PDate::new()->now()->addWeek(1)->get();
// 1403-03-17 21-16-25

PDate::new()->now()->addMonth(1)->get();
// 1403-03-14 21-16-25

PDate::new()
   ->fromGregorian('2024-04-29')
   ->format('Y-m-d')
    ->addDay(5)
   ->get();
  // 1403-02-15
```

### Methods

[](#methods)

```
$pdate = PDate::new();

$pdate->day(); // 27

$pdate->month(); // 11

$pdate->year(); // 1403

$pdate->clock(); // 20:46:32

$pdate->hour(); // 23

$pdate->minutes(); // 59

$pdate->second(); // 45

// Persian month name
$pdate->monthName(); //خرداد

//The number of days in the month
$pdate->monthDays(); // 31
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

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

Total

2

Last Release

540d ago

### Community

Maintainers

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

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/webrium-pdate/health.svg)

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

###  Alternatives

[spatie/laravel-google-calendar

Manage events on a Google Calendar

1.4k1.5M21](/packages/spatie-laravel-google-calendar)[gajus/dindent

HTML indentation library for development and testing.

1781.9M50](/packages/gajus-dindent)[mindplay/php-vite

a lightweight PHP-backend integration for the Vite frontend build tool

6690.5k2](/packages/mindplay-php-vite)[contributte/forms-wizard

Wizard component for nette/forms

15783.7k](/packages/contributte-forms-wizard)[mvo/contao-group-widget

Adds a new group widget that allows repeating a set of DCA fields.

28124.3k31](/packages/mvo-contao-group-widget)

PHPackages © 2026

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