LaravelPackages.net
Acme Inc.
Toggle sidebar
reind33r/simpledateformatter

:description

9
0
0.1.0
About reind33r/simpledateformatter

reind33r/simpledateformatter is a Laravel package for :description. It currently has 0 GitHub stars and 9 downloads on Packagist (latest version 0.1.0). Install it with composer require reind33r/simpledateformatter. Discover more Laravel packages by reind33r or browse all Laravel packages to compare alternatives.

Last updated

SimpleDateFormatter

This package for Laravel provides a simple yet effective Blade directive to format localized dates.

Installation

Via Composer

$ composer require reind33r/simpledateformatter

Usage

In your Blade template :

@localized_date($date, $date_format='long|full|short', $time_format=true|false)

If no value (or an incorrect one) is provided to $date_format, default format will be short.
If no value is provided for $time_format, default is false.

The package uses the locale configured in your Laravel app to construct a IntlDateFormatter object, then it uses the predefined PHP formats :

  • IntlDateFormatter::LONG
  • IntlDateFormatter::FULL
  • IntlDateFormatter::SHORT

Change log

This is the first version.

License

This package is licensed under MIT license.

Star History Chart