New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

chinleung/laravel-weekday

A wrapper for chinleung/php-weekday.
8,208
Install
composer require chinleung/laravel-weekday
Latest Version:v2.0.1
PHP:^7.1
Laravel:5 – 8
License:MIT
Last Updated:Dec 10, 2020
Links: GitHub  ·  Packagist
Maintainer: ChinLeung

Laravel Weekday

Latest Version on Packagist Build Status Quality Score Total Downloads

This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.

Installation

You can install the package via composer:

composer require chinleung/laravel-weekday

Usage

Retrieve a name from a value

Weekday::name(0); // Sunday

Retrieving a name from a value for a different locale

Weekday::name(1, 'fr'); // Lundi

Retrieving a value from a name

Weekday::value('Sunday'); // 0

Retrieving a value from a name for a different locale

Weekday::value('Dimanche', 'fr'); // 0

Retrieving all names for a locale

Weekday::names('en');

Changing the locale of an instance

Weekday::name(0)->to('fr')->getName(); // Dimanche

Retrieving the PhpWeek instance:

// Object of \ChinLeung\PhpWeek\PhpWeek with Sunday and set to locale of the application.
Weekday::parse('Sunday')->getInstance();

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email hello@chinleung.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.

Related Packages

chinleung/laravel-locales

Add configurations and helpers for a multi locale application.

256,931 36
laravelista/loki

Laravel localization done right.

16,727 78
chinleung/laravel-faker-providers

Custom collection of Laravel Faker providers.

12,234 0
netstudio/loki

Laravel localization done right.

5,723 0

Version History

Version Released PHP Laravel License
v2.0.1 ^7.1 ~5.8.0|^6.0|^7.0|^8.0 MIT
v2.0.0 ^7.1 ~5.8.0|^6.0 MIT
v1.0.2 ^7.1 ~5.8.0|^6.0 MIT
v1.0.1 ^7.1 5.8.* MIT
v1.0.0 ^7.1 5.8.* MIT