Documentation

examples

English to Nepali

Example Code

$englishDate = '1996-04-22';
$result = LaravelNepaliDate::from($englishDate)->toNepaliDate(format: 'd F Y');
// Result: १० वैशाख २०५३

You can pass additional format and locale option to the toNepaliDate() method to specify format and locale. The default format is 'Y-m-d' and the default locale is 'en'.

Example Code

$englishDate = '1996-04-22';
$result = LaravelNepaliDate::from($englishDate)->toNepaliDate(format: 'd F Y', locale: 'en');
// Result: 10 Baisakh 2053

Conclusion

Converting English dates to Nepali dates has never been easier. Laravel Nepali Date Converter empowers you to seamlessly integrate this functionality into your Laravel projects, ensuring a smooth user experience for applications catering to Nepali audiences.

Next, let's explore how to convert Nepali dates to English dates in the Nepali to English section.

Previous
Usage