定制 proshore/nepali-date-converter 二次开发

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

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

proshore/nepali-date-converter

最新稳定版本:1.0.0

Composer 安装命令:

composer require proshore/nepali-date-converter

包简介

Package to convert carbon date to nepali date

README 文档

README

This Laravel package provides functionality to convert dates from the Gregorian calendar (AD) to the Bikram Sambat calendar (BS) using the native Carbon library. It's especially useful for applications targeting Nepali users or systems where Bikram Sambat dates are relevant.

Features

  • Seamless conversion of dates from AD to BS and vice versa.
  • Integration with Laravel's native Carbon library for efficient and accurate date manipulation.
  • Simple to integrate into existing Laravel applications.

Tests Laravel Nepali Date Converter Code Analysis

Requirements

  • PHP >= 8.0
  • Carbon PHP Library

Installation

Composer

Install using composer

composer require proshore/laravel-nepali-date-converter

Publish your config file

php artisan vendor:publish --tag=nepali-date

Usages

You can directly convert Carbon date to Nepali date using chain function in Carbon.

Carbon\Carbon::now()->toBS();

To Bs Example

Get Formatted date

Carbon\Carbon::now()->toBSDate();

Carbon\Carbon::now()->toBSFormattedDate();

Formatted To Bs Example

Using without carbon

Proshore\NepaliDate\Facades\NepaliDateConverter::getBSbyAd(2024,03,01);

Proshore\NepaliDate\Facades\NepaliDateConverter::getADbyBS(2080,11,18);

Default converter

Get Carbon date from Bs Date

Proshore\NepaliDate\Facades\NepaliDateConverter::toAD(2080,11,18);

BS To Carbon Date

Contributers ✨


统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-03-05