Skip to content

Commit 50dc115

Browse files
committed
📝 readme: update readme's usage section to showcase getDaysIn[Month|Year] feature.
1 parent ec3f0d4 commit 50dc115

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ LaravelNepaliDate::from($nepDate)->toEnglishDate(format: 'l, jS F Y');
4545
// Format Specifiers are supported and listed below
4646
LaravelNepaliDate::from($nepDate)->toEnglishDate(format: 'l, j F Y', locale: 'np');
4747
// Result: आइतबार, २२ बैशाख १९९६
48+
49+
// Get total days in a month of a year
50+
use Anuzpandey\LaravelNepaliDate\Enums\NepaliMonth;
51+
// month can be NepaliMonth::XXX or month number (1-12)
52+
LaravelNepaliDate::daysInMonth(NepaliMonth::BAISAKH, 2053);
53+
// Result: 31
54+
55+
// Get total days in a year
56+
LaravelNepaliDate::daysInYear(2053);
57+
// Result: 365
4858
```
4959

5060
## Format Specifiers

0 commit comments

Comments
 (0)