定制 kmlpandey77/ndate 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

kmlpandey77/ndate

最新稳定版本:0.1.4

Composer 安装命令:

composer require kmlpandey77/ndate

包简介

Nepali date converter

README 文档

README

A PHP library for AD to BS and BS to AD

Install

Run the following command from you terminal:

composer require kmlpandey77/ndate

Usage

AD to BS

use Kmlpandey77\Ndate\Ndate;

# Example 01

$date_to_bs = Ndate::to_bs("2023-11-08");

echo $date_to_bs // OUTPUT: 2080-07-22 
echo $date_to_bs->lang(Ndate::NP) // OUTPUT: २०८०-०७-२२


# Example 02

$date_to_bs = Ndate::to_bs("2023-11-08", 'd/m/Y');

echo $date_to_bs // OUTPUT: 22/07/2080
echo $date_to_bs->format('l, d M, Y') // Wednesday, 22 Kartik, 2080
echo $date_to_bs->format('l, d M, Y')->lang(Ndate::NP) // OUTPUT: बुधवार, २२ कार्तिक, २०८०

Available Date Format

Format Description Example
d Day of the month, 2 digits with leading zeros 01 to 32
D A textual representation of a day, three letters Mon for Monday
j Day of the month without leading zeros 1 to 31
l A full textual representation of the day of the week Monday, Tuesday
m Numeric representation of a month, with leading zeros 01 to 12
M A full textual representation of a month Baishak, Jestha
n Numeric representation of a month, without leading zeros 1 to 12
Y A full numeric representation of a year, 4 digits 2078

BS to AD

use Kmlpandey77\Ndate\Ndate;

# Example 01

$date_to_ad = Ndate::to_ad("2080-07-22");

echo $date_to_ad // OUTPUT: 2023-11-08

# Example 02
$date_to_ad = Ndate::to_ad("2080-07-22", 'd/m/Y');

echo $date_to_ad // OUTPUT: 08/11/2023

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-01-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固