承接 chumpol/laravel-thaidate 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

chumpol/laravel-thaidate

最新稳定版本:v1.0.0

Composer 安装命令:

composer require chumpol/laravel-thaidate

包简介

A Laravel, PHP package for thaidate() function

README 文档

README

test Packagist Maintainability

Installation

composer require chumpol/laravel-thaidate

thaidate() function

Display date in Thai using the same PHP built-in date() function attributes. The date format is as same as PHP Datetime Format.

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

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

The MIT License (MIT)

统计信息

  • 总下载量: 496
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-06-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固