Skip to content

Commit

Permalink
📝 readme: update readme's usage section to showcase getDaysIn[Month|Y…
Browse files Browse the repository at this point in the history
…ear] feature.
  • Loading branch information
anuzpandey committed May 11, 2024
1 parent ec3f0d4 commit 50dc115
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ LaravelNepaliDate::from($nepDate)->toEnglishDate(format: 'l, jS F Y');
// Format Specifiers are supported and listed below
LaravelNepaliDate::from($nepDate)->toEnglishDate(format: 'l, j F Y', locale: 'np');
// Result: आइतबार, २२ बैशाख १९९६

// Get total days in a month of a year
use Anuzpandey\LaravelNepaliDate\Enums\NepaliMonth;
// month can be NepaliMonth::XXX or month number (1-12)
LaravelNepaliDate::daysInMonth(NepaliMonth::BAISAKH, 2053);
// Result: 31

// Get total days in a year
LaravelNepaliDate::daysInYear(2053);
// Result: 365
```

## Format Specifiers
Expand Down

0 comments on commit 50dc115

Please sign in to comment.