Releases: hananils/kirby-date-methods
Releases · hananils/kirby-date-methods
Housekeeping + Docs
This release adds better docs and ensures Kirby 5 compatibility.
Fix `dateRange` locale awareness
This release fixes the dateRange function to correctly detect the current language instead of defaulting to German. See #3.
Version 2.1.0: Locale relative dates
- Add missing locale setting to
dateRelative()
Version 2.0.1: Examples
- Added examples to the readme.
Version 2.0.0: Time Traveller
This update add more date methods and improves the overall documentation.
There are now the following methods available:
1. Converters
Converters read a date string and convert it to PHP date and time objects like DateTime, DateTimeImmutable or DateInterval or arrays.
toDateTime()ordatetime()toDateTimeImmutable()toDateInterval()toDateDiff()toDatePeriod()toDates()
2. Formatters
Formatters read a date string and return a formatted and localized string, either absolute or relative.
toFormatted()ordateFormatted()toFormattedPattern()toRelative()ordateRelative()toTime()toAge()toDateRange()ordateRange()
3. Modifiers
Modifiers adjust dates to the current day, month or year which is helpful when you need to display the birthday of a person this year.
toDateRounded()ordateRounded()toCurrentYear()toCurrentMonth()toCurrentDay()normalizeDate()normalizeTime()
4. Validators
Version 1.0.0
Initial release.