Laravel package to convert AD to BS that can work with carbon.

Overview

Laravel Nepali Date Converter

Laravel Nepali Date Converter

Latest Version on PackagistStars Downloads StyleCI Build Status Scrutinizer Code Quality CodeFactor License

Laravel package to convert AD to BS that can work with carbon.

Installation

You can install the package via composer:

composer require pratiksh/nepalidate

Usages

By Using Facade.

use Pratiksh\Nepalidate\Facades\NepaliDate;

NepaliDate::create(\Carbon\Carbon::now())->toBS(); // 2078-4-21
NepaliDate::create(\Carbon\Carbon::now())->toFormattedBSDate(); // 21 Shrawan 2078, Thurday
NepaliDate::create(\Carbon\Carbon::now())->toFormattedNepaliDate(); // २१ साउन २०७८, बिहिवार

By Using Helper Function.

use Pratiksh\Nepalidate\Facades\NepaliDate;

toBS(\Carbon\Carbon::now()); // 2078-4-21
toFormattedBSDate(\Carbon\Carbon::now()); // 21 Shrawan 2078, Thurday
toFormattedNepaliDate(\Carbon\Carbon::now()); // २१ साउन २०७८, बिहिवार

Mode Controlled Nepali Date Helper

for this to work publish config file

php artisan vendor:publish --provider="Pratiksh\Nepalidate\Providers\NepalidateServiceProvider"

then in config

<?php

return [
    /*
    |--------------------------------------------------------------------------
    | Nepali Date Return Mode
    |--------------------------------------------------------------------------
    | 1 = toBS
    | 2 = toFormattedBSDate
    | 3 = toFormattedBSDate
    |
    */
    'mode' => 1
];
// OUTPUT
// if mode = 1 then output 2078-4-21
// if mode = 2 then output 21 Shrawan 2078, Thurday
// if mode = 3 then output २१ साउन २०७८, बिहिवार
nepalidate(\Carbon\Carbon::now());

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

You might also like...
Boilerplate code for protecting a form with proof of work. Uses javascript in the browser to generate the hashcash and PHP on the server to generate the puzzle and validate the proof of work.

Boilerplate code for protecting a form with proof of work. Uses javascript in the browser to generate the hashcash and PHP on the server to generate the puzzle and validate the proof of work.

A PHP Library To Make Your Work Work Easier/Faster

This Is A Php Library To Make Your Work Easier/Faster,

You can convert any table to CSV/EXCEL file.
You can convert any table to CSV/EXCEL file.

Convert MySQL to EXCEL You can convert any table to CSV/EXCEL file by this code. In this repository I've used Link1 and Link2 . Simply edit config.php

Connect and work with MySQL/MariaDB database through MySQLi in PHP. This is an introductory project, If you need a simple and straightforward example that takes you straight to the point, you can check out these examples.
Connect and work with MySQL/MariaDB database through MySQLi in PHP. This is an introductory project, If you need a simple and straightforward example that takes you straight to the point, you can check out these examples.

First MySQLi PHP Connect and work with MySQL/MariaDB database through MySQLi in PHP. The above exercises are designed for students. This is an introdu

A wiki to ease developers' work by providing a user authentication librariesthat can be used as middleware within a web application to authenticate

A wiki to ease developers' work by providing a user authentication librariesthat can be used as middleware within a web application to authenticate (their application user) requests.

Laravel package to convert English numbers to Bangla number or Bangla text, Bangla month name and Bangla Money Format

Number to Bangla Number, Word or Month Name in Laravel | Get Wordpress Plugin Laravel package to convert English numbers to Bangla number or Bangla te

Laravel package to convert English numbers to Bangla number or Bangla text, Bangla month name and Bangla Money Format

Number to Bangla Number, Word or Month Name in Laravel | Get Wordpress Plugin Laravel package to convert English numbers to Bangla number or Bangla te

Laravel package to convert HTML to PDF, supporting multiple drivers.

eve/pdf-converter A Laravel package to help convert HTML to PDF. Supports multiple drivers. Requirements and Installation eve/pdf-converter requires L

Laravel package to convert English numbers to Bangla number or Bangla text, Bangla month name and Bangla Money Format

Number to Bangla Number, Word or Month Name in Laravel | Get Wordpress Plugin Laravel package to convert English numbers to Bangla number or Bangla te

Laravel package to convert currencies to/from Ghana Cedis(GHS).

Kudi About A Laravel package to convert currencies to/from Ghana Cedis(GHS). Installation composer require iamkarsoft\kudi Publishing config files php

A PHP/Laravel package to fetch Notion Pages and convert it to HTML!

Generate HTML from Notion Page This package converts all the blocks in a Notion page into HTML using Notion's API. For more details on Notion API, ple

This package provides a console command to convert dynamic JS/CSS to static JS/CSS assets.
This package provides a console command to convert dynamic JS/CSS to static JS/CSS assets.

Laravel Nova Search This package provides a console command to convert dynamic JS/CSS to static JS/CSS assets. Requirements laravel-mix v6.0+ php 7.3+

In order to use the Korean Language on your Magento 2 store, it is time to start with Magento 2 Korean Language Pack in the set of informative documentations by Mageplaza. Magento 2 Korean Language Package is published by Magento 2 Translation Project at Crowdin, so all phrases will be replaced by the Korean language according to the contribution to that project. Please following up the guides in this post to convert the language with ease!
A simple to use opinionated ERP package to work with Laravel

Laravel ERP A simple to use opinionated ERP package to work with Laravel Installation You can install the package via composer: composer require justs

Laravel package to work with geospatial data types and functions.

Laravel Spatial Laravel package to work with geospatial data types and functions. For now it supports only MySql Spatial Data Types and Functions. Sup

This package allows you to easily work with NanoID in your Laravel models.
This package allows you to easily work with NanoID in your Laravel models.

Laravel Model UUIDs Introduction Huge thanks to Micheal Dyrynda, whose work inspired me to create this package based on laravel-model-nanoid but uses

Localization Helper - Package for convenient work with Laravel's localization features and fast language files generation
Localization Helper - Package for convenient work with Laravel's localization features and fast language files generation

Localization Helper Package for convenient work with Laravel's localization features and fast language files generation. Installation Via Composer $ c

Python package to easily work with selenium and manage tabs effectively.

Simple Selenium The aim of this package is to quickly get started with working with selenium for simple browser automation tasks. Installation Install

Releases(v1.4.2)
Owner
DRH2SO4
DRH2SO4
This library helps PHP users to convert and using Jalali DateTime format

Easy Jalali for PHP V1.0.0 Jalali calendar converter for Persian users in Iran, Afghanistan and other countries that use Jalali calendar. Very thanks

Majid J 3 Mar 20, 2022
iCal-creator for PHP - This package offers an abstraction layer for creating iCalendars files

This package offers an abstraction layer for creating iCalendars files. By using this PHP package, you can create *.ics files without the knowledge of the underling format. The output itself will follow RFC 5545 as good as possible.

Markus Poerschke 1k Dec 23, 2022
A package which provides a monthly calendar with days and events depending on given months and events.

A package which provides a monthly calendar with days and events depending on given months and events. This is where your description should go. Try a

MichaB 6 Nov 1, 2022
Flexible Calendar for Laravel 4

Laravel 4 Calendar Flexible Calendar for Laravel 4, supports Month, Week and Day Views and multiple events per date. To change the view type dynamical

null 59 Dec 24, 2022
Laravel 9 & React Event Calendar

###Event Calendar ##Projeyi docker üzerinde ayağa kaldırma #Acount Service accountService klasörü içine girerek docker-compose up --build komutu ile a

Muhammed Mustafa Bulut 4 Apr 19, 2022
Clase Calendario Colombia Calculo de Festivos, Manejo de Fechas, Migraciones Laravel

Calendario Colombia | Calendar Colombia | Laravel (^5) Control del Calendario de Colombia desde llamado de métodos de Clase. PHP (^7.4). Control fácil

Raúl Mauricio Uñate Castro 9 Sep 10, 2022
🗓 A library to help you work with dates in multiple languages, based on Carbon.

Date This date library extends Carbon with multi-language support. Methods such as format, diffForHumans, parse, createFromFormat and the new timespan

Jens Segers 1.8k Dec 30, 2022
Carbon.IncludeAssetsCache Package for Neos CMS

Extend Carbon.IncludeAssets with an seperate cache entry for the included files. If a file changes, the cache gets flushed. This is useful if you have got dynamic CSS or JavaScript files on your server.

Carbon.Packages 2 Jan 18, 2022
A standalone DateTime library originally based off of Carbon

CakePHP Chronos Chronos aims to be a drop-in replacement for nesbot/carbon. It focuses on providing immutable date/datetime objects. Immutable objects

CakePHP 1.3k Jan 1, 2023
Wordpress wrapper to expose Carbon Fields to WpGraphQL queries.

WpGraphQLCrb A Wordpress wrapper to expose Carbon Fields to WpGraphQL queries. Important This is just the first version. There is a lot of work to be

Matheus Paiva 16 Aug 19, 2022