PHPackages                             tkstarir/tkstarjdc - 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. tkstarir/tkstarjdc

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

tkstarir/tkstarjdc
==================

TkStar Jalali Date Class + Occasions and Holidays from LuanchPad Framework

v1.0.00000(8mo ago)02MITPHPPHP &gt;=8.0

Since Sep 7Pushed 8mo agoCompare

[ Source](https://github.com/tkstarir/TkStarJDC)[ Packagist](https://packagist.org/packages/tkstarir/tkstarjdc)[ RSS](/packages/tkstarir-tkstarjdc/feed)WikiDiscussions TkStarIR Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

TkStarJDC
=========

[](#tkstarjdc)

TkStar Jalali Date Class + *Occasions* and *Holidays*

Fully comprehensive PHP library for Jalali and Gregorian date converting to each other with *Occasions* and *Holidays* of both Gregorian and galali in a Single Class

Coming Soon: Lunar support for *Occasions*, *Holidays* and Date Converting ...

Table of Contents
-----------------

[](#table-of-contents)

- [TkStarJDC library description](#where-come-from-this-package)
- [Converting dates to each other formats](#jalali-to-gregorian-and-gregorian-to-jalali-converting)
- [Gregorian occasions](#gregorian-occasions)
- [Jalali occasions](#jalali-occasions)
- [Getting distances between two dates](#distance-between-two-gregorian-dates-based-on-year-month-days-hours-minutes-and-days)

Where come from this package
----------------------------

[](#where-come-from-this-package)

***This Package is a part of [LaunchPad Framework](https://github.com/TkStarIR/LaunchPad)***

Installing Package:
-------------------

[](#installing-package)

```
composer require tkstarir/tkstarjdc

```

To date method symbols:
-----------------------

[](#to-date-method-symbols)

```
a: To display current half day in abbreviation: ق.ظ or ب.ظ
A: To display current half day: قبل از ظهر or بعد از ظهر
c: To display complete datetime in format of YYYY/MM/DD HH:ii:ss
d: To display the day such as 11 or 24
l: To display day of week such as یک شنبه or جمعه
D: To display first character of day of the week such as ی for یک شنبه or ج for جمعه
F: To display complete name of month such as فروردین or بهمن
h: To display the hour in 12-hour format with 0 for hours less than 10
H: To display the hour in 24-hour format without 0 for hours less than 10
i: To display the minute with 0 for minutes less than 10
s: To display the second with 0 for seconds less than 10
S: To display the second without 0 for seconds less than 10
m: To display the month number with 0 for months less than 10 such as 06 for شهریور
M: To display the first three characters of month name such as شهر for شهریور or اسف for اسفند
n: To display the month number without 0 for months less than 10 such as 6 for شهریور
r: To display the current format of date: l, d F Y ساعت H:i:s such as شنبه, 16 بهمن 1378 ساعت 11:54:37
w: To display the number of current weekday such as 3 for Tuesday
W: To display the week number of year based on ISO-8601 standard
y: To display the year as two digits such as 78 for 1378
Y: To display the year as four digits
U: To display the timestamp of your time

```

Date converter samples:
-----------------------

[](#date-converter-samples)

```
use LaunchPad\Components\TkStarJDC;

echo(TkStarJDC::date('Y/m/d H:i:s')); // Result => 1378/11/16 00:00:00

echo(TkStarJDC::date('Y/m/d H:i:s', date('U'))); // Result => 1378/11/16 00:00:00

echo(TkStarJDC::date('l, d F Y ساعت H:i:s', time())); // Result => شنبه, 16 بهمن 1378 ساعت 00:00:00

echo(TkStarJDC::date('Y/m/d H:i:s', strtotime('-1 day'))); // Result => 1378/11/15 00:00:00

echo(TkStarJDC::date('Y/m/d H:i:s', strtotime('-1 week'))); // Result => 1378/11/8 00:00:00

echo(TkStarJDC::date('Y/m/d H:i:s', strtotime('-1 month'))); // Result => 1378/10/16 00:00:00

echo(TkStarJDC::date('Y/m/d H:i:s', strtotime('-1 year'))); // Result => 1377/11/16 00:00:00

echo(TkStarJDC::date('Y/m/d H:i:s', strtotime('2000-02-05'))); // Result => 1378/11/16 00:00:00

echo(TkStarJDC::date('Y/m/d H:i:s', strtotime('2000-02-05 12:30:00'))); // Result => 1378/11/16 12:00:00

```

Jalali to gregorian and gregorian to jalali converting:
-------------------------------------------------------

[](#jalali-to-gregorian-and-gregorian-to-jalali-converting)

```
use LaunchPad\Components\TkStarJDC;

echo(join('-', TkStarJDC::JalaliToGregorian(1378, 11, 16))); // Result => 2000-2-5

echo(join('/', TkStarJDC::GregorianToJalali(2000, 02, 05))); // Result => 1378/11/16

$array = TkStarJDC::JalaliToGregorian(1378, 11, 16)); // Result => [ year, month, day ]

$array = TkStarJDC::GregorianToJalali(2000, 02, 05)); // Result => [ year, month, day ]

```

Gregorian occasions:
--------------------

[](#gregorian-occasions)

```
use LaunchPad\Components\TkStarJDC;

$array = TkStarJDC::Occasions('2000-02-05', 'gregorian'); // Result => [ ... ]

$array = TkStarJDC::Occasions('2000/02/05', 'gregorian'); // Result => [ ... ]

```

Jalali occasions:
-----------------

[](#jalali-occasions)

```
use LaunchPad\Components\TkStarJDC;

$array = TkStarJDC::Occasions('1378-11-16', 'jalali'); // Result => [ ... ]

$array = TkStarJDC::Occasions('1378/11/16', 'jalali'); // Result => [ ... ]

```

Distance of two gregorian dates:
--------------------------------

[](#distance-of-two-gregorian-dates)

```
use LaunchPad\Components\TkStarJDC;

$check_distance = TkStarJDC::Check_Distance('2022-11-09', '2000-02-05'); // Result => [ ... ]

var_export($check_distance);

/*
  array (
    'is_reverse' => false,
    'total_seconds' => 718243200.0,
    'years' => 22,
    'months' => 4,
    'days' => 5,
    'hours' => 0,
    'minutes' => 0,
    'seconds' => 0.0,
  )
*/

```

***Lunar Support for All of Above Types and Methods: Coming Soon ...***

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance60

Regular maintenance activity

Popularity2

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

254d ago

### Community

Maintainers

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

---

Tags

 jdfjalali date functionjdctkstarjdc

### Embed Badge

![Health badge](/badges/tkstarir-tkstarjdc/health.svg)

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

PHPackages © 2026

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