Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
djl997 committed Jun 25, 2024
1 parent c30b017 commit 1fa33d3
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,16 @@ After installation, all directives should be usable immediately. If something go
- year
- month
- day
- cascadeFromMinutes
- cascadeFromHours
- cascadeFromDays
- cascadeFromWeeks
- cascadeFromMonths
- [dayOf...](#day-of-week-day-of-month-day-of-year)
- dayOfWeek
- dayOfMonth
- dayOfYear
- [cascades](#carbon-cascades)
- cascadeFromMinutes
- cascadeFromHours
- cascadeFromDays
- cascadeFromWeeks
- cascadeFromMonths
- [Filesizes](#filesize)
- [Nl2br](#nl2br)
- [Not empty](#not-empty-inverse-of-empty)
Expand Down Expand Up @@ -95,19 +100,19 @@ You even can add a custom date to datetime, time, year, month or day, for exampl
```

#### Day of Week, Day of Month, Day of Year
In some cases you need the x day of week, month or year.
In some cases you need the _x_ day of week, month or year.

```blade
@dayOfWeek <!-- 2 -->
@dayOfMonth <!-- 25 -->
@dayOfYear <!-- 177 -->
@dayOfMonth <!-- 25 -->
@dayOfWeek <!-- 2 -->
```

Or generate it based on a value:
```blade
@dayOfWeek('2024-06-25') <!-- 2 -->
@dayOfWeek(now()->subDay()) <!-- 1 -->
@dayOfMonth($user->updated_at) <!-- 177 -->
@dayOfYear($user->updated_at) <!-- 177 -->
```

#### Carbon Cascades
Expand Down

0 comments on commit 1fa33d3

Please sign in to comment.