PHPackages                             chumpol/laravel-thaidate - 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. chumpol/laravel-thaidate

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

chumpol/laravel-thaidate
========================

A Laravel, PHP package for thaidate() function

v1.0.0(5y ago)0503MITPHPPHP ^7.4|^8.0

Since Jun 19Pushed 5y ago1 watchersCompare

[ Source](https://github.com/momoman/laravel-thaidate)[ Packagist](https://packagist.org/packages/chumpol/laravel-thaidate)[ RSS](/packages/chumpol-laravel-thaidate/feed)WikiDiscussions master Synced 3w ago

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

[![test](https://github.com/momoman/laravel-thaidate/actions/workflows/php.yml/badge.svg)](https://github.com/momoman/laravel-thaidate/actions/workflows/php.yml/badge.svg)[![Packagist](https://camo.githubusercontent.com/d05d8cfd9331873014264fa8050f7c4f045aa8c98992a521423de0511af53f63/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6368756d706f6c2f74686169646174652e737667)](https://github.com/momoman/laravel-thaidate/releases)[![Maintainability](https://camo.githubusercontent.com/1d682d99e1752cee976bcf8c5df7546061903ada811de02b4fdaeac1296f2b45/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f38363633373935373135343138313239363066362f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/momoman/laravel-thaidate/maintainability)

 Installation
===================================================

[](#-installation)

```
composer require chumpol/laravel-thaidate

```

 thaidate() function
========================================================

[](#-thaidate-function)

Display date in Thai using the same PHP built-in [date()](https://www.php.net/manual/en/function.date.php)function attributes. The date format is as same as [PHP Datetime Format](https://www.php.net/manual/en/datetime.format.php).

Default Format `j F Y`:

```
echo thaidate();
// 25 กุมภาพันธ์ 2564
```

With PHP Date Format:

```
echo thaidate('วันlที่ j F พ.ศ.Y เวลา H:i:s');
// results: วันพฤหัสบดีที่ 25 กุมภาพันธ์ พ.ศ.2564 เวลา 23:55:29
```

Laravel Carbon Usage
====================

[](#laravel-carbon-usage)

You can also use `thaidate()` function directly from Laravel carbon instance. It uses Laravel macro feature to add the functionality as a carbon method.

```
use Illuminate\Support\Carbon;

Carbon::parse('2021-06-25')->thaidate();
// 25 มิถุนายน 2564

Carbon::parse('2021-06-25')->thaidate('D j M y');
// ศ. 25 มิ.ย. 64
```

This means you can use thaidate() directly from an Eloquent model attributes that is a date attribute as well.

```
$user->created_at->thaidate();
// 25 มิถุนายน 2564
```

License
-------

[](#license)

The MIT License (MIT)

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity57

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

1841d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/449ec350cbbbb197c6d25fad2c0a0120f883965f9ffdf8178b7c1a98e8c6484e?d=identicon)[chumpol](/maintainers/chumpol)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/chumpol-laravel-thaidate/health.svg)

```
[![Health](https://phpackages.com/badges/chumpol-laravel-thaidate/health.svg)](https://phpackages.com/packages/chumpol-laravel-thaidate)
```

###  Alternatives

[werkstattl/openblogware

OpenBlogware: A Blog Module for Shopware 6.

438.0k](/packages/werkstattl-openblogware)

PHPackages © 2026

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