Download the PHP package rohanadhikari/nepali-date without Composer

On this page you can find all versions of the php package rohanadhikari/nepali-date. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package nepali-date

NepaliDate — Bikram Sambat (BS) Date & Time for PHP

Latest Version on Packagist Total Downloads PHP Version

NepaliDate is a dependency-free PHP library for working with the Nepali calendar (Bikram Sambat / BS) — the calendar of Nepal. It converts between AD (Gregorian) and BS, formats, parses, compares, and manipulates Nepali dates with a fluent, Carbon-inspired API, and ships first-class Laravel support (Eloquent casts, validation rules, and Blade directives).

Whether you're building a Nepali government portal, a Nepal-based e-commerce app, a school/attendance system, or just need accurate AD ⇄ BS date conversion in PHP, NepaliDate gives you a complete, tested toolkit instead of hand-rolled conversion math.


✨ Features


📦 Installation

Install via Composer:

No other setup is required for plain PHP. In Laravel, the service provider is auto-discovered — see Laravel Integration.


🚀 Quick Start

[!NOTE] Predefined format constants are listed in Constants.

Using in plain PHP (no framework)

Make sure the path to vendor/autoload.php is correct relative to your script — Composer is the recommended way to load the package.


📖 Documentation

The core README covers the essentials; everything else lives in docs/, organized by topic (Carbon-style) so you only read what you need:

Guide Covers
Initialization now(), fromAd(), fromNotation(), fromTimestamp(), direct construction
Formatting Format tokens, examples, locale-aware output
Parsing parse(), createFromFormat(), custom parse patterns
Arithmetic & Shifting Add/subtract units, month overflow control, diff, timezone/week shifting
Getters Year, time, day, month, timezone, and locale-based accessors
Setters Basic, unit-based, and combined setters
Boundaries startOf()/endOf() for day, week, month, quarter, year, decade...
Comparison eq(), between(), isToday(), isWeekend(), and other state checks
Constants Weekday, month, locale, and format constants
Locale Customization Customizing month/weekday names per locale
Macros Adding custom methods at runtime
Nepali Numbers Digit, currency, and word conversion utilities
Calendar Low-level BS/AD calendar math and lookup tables
Exceptions What can be thrown, and how to guard against it
Laravel Integration Eloquent casts, validation rules, Blade directives

🌐 Locale

Available locales: en and np.

[!NOTE] Set a global default for every new instance with NepaliDate::defaultLocale(NepaliDate::NEPALI). See Locale Customization to change the underlying month/weekday names.


Laravel Integration

Casts, form validation rules, and Blade directives (@nepaliDate, @nepaliNow, @nepaliWeekend, ...) are all included and auto-registered — see the Laravel Integration Guide for the full reference.


🧪 Testing


🤝 Contributing

Contributions are welcome and will be fully credited. Please read the Contributing Guide before opening an issue or pull request.

🔒 Security

If you discover a security vulnerability, please see SECURITY.md for responsible disclosure instructions instead of using the public issue tracker.

📄 License

The MIT License (MIT). See LICENSE.md for details.


All versions of nepali-date with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rohanadhikari/nepali-date contains the following files

Loading the files please wait ...