Download the PHP package dipesh/nepali-date without Composer
On this page you can find all versions of the php package dipesh/nepali-date. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dipesh/nepali-date
More information about dipesh/nepali-date
Files in dipesh/nepali-date
Package nepali-date
Short Description The Nepali Date package is designed for working with the Nepali calendar. It provides functionality for converting dates between the English (AD) and Nepali (BS) calendars, along with a wide range of methods for handling and manipulating Nepali dates. This comprehensive tool facilitates seamless integration and operations within the Nepali calendar system.
License MIT
Informations about the package nepali-date
Nepali Date
The Nepali Date package is designed for working with the Nepali calendar. It provides functionality for converting dates between the English (AD) and Nepali (BS) calendars, along with a wide range of methods for handling and manipulating Nepali dates. This comprehensive tool facilitates seamless integration and operations within the Nepali calendar system.
Installation
To install the package, use Composer:
Uses
Creating Instances
Date Conversion
Date Component Retrieval Based on the Language Configuration
Date Manipulation and Comparison Methods
Formatting
Supported format characters: Y, m, M, F, d, w, D, l, g
Format Character | Description | Example Output |
---|---|---|
Y |
Year (4-digit format) | 2078 |
m |
Month (Numeric, zero-padded, 01-12) | 01 for Baisakh, 12 for Chait |
M |
Month (Short textual representation) | Bai for Baisakh, Dec for Chai |
F |
Month (Full textual representation) | Baisakh , Jeth |
d |
Day of the month (Numeric, zero-padded, 01-31) | 01 for the 1st, 31 for the 31st |
w |
Day of the week (Numeric, 1-7) | 1 for Aaitabar, 7 for Sanibar |
D |
Day of the week (Short textual representation) | Aaita for Aaitabar, Budh for Budhabar |
l |
Day of the week (Full textual representation) | Aaitabar , Sombar |
g |
This is not for english(AD) format | Gate or गते |
Recommended Package for Full Calendar System
For developers looking to create a comprehensive Calendar system, we recommend the dipesh/calendar package. This package provides an easy-to-use interface for managing a full Nepali calendar, allowing you to seamlessly add events, navigate through months and years, and much more.
To install the package, run:
Extending and Customizing the Nepali Date Package
This package is designed for great extensibility, allowing you to customize key components to fit your specific needs. The package is built around three main concepts:
- DateProcessor: Handles all date-related calculations and logic.
- Language: Manages language-specific aspects, such as number formatting and month names.
- Formatter: Controls how dates are formatted and displayed.
You can extend or replace these components with your own implementations, enabling you to modify the core logic without touching the existing codebase. Below are examples of how to achieve this customization:
Example: Extending the Nepali Date Class
Example: Creating a Custom DateProcessor
Example: Creating a Custom Formatter
Example: Creating a Custom Language
License
Nepali Date is open-sourced package licensed under the MIT license.****