https://github.com/poldixd/human-readable-time
This package shows date time or human readable time. You can adjust the exact time when the package shows the date time instead the human readable time.
https://github.com/poldixd/human-readable-time
blade carbon datetime laravel time
Last synced: 10 months ago
JSON representation
This package shows date time or human readable time. You can adjust the exact time when the package shows the date time instead the human readable time.
- Host: GitHub
- URL: https://github.com/poldixd/human-readable-time
- Owner: poldixd
- License: mit
- Created: 2021-04-01T14:42:02.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-01-27T09:31:42.000Z (almost 3 years ago)
- Last Synced: 2025-03-09T00:39:55.887Z (11 months ago)
- Topics: blade, carbon, datetime, laravel, time
- Language: PHP
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Show date time or human readable time 🕐 👀
This package shows date time or human readable time. You can adjust the exact time when the package shows the date time instead the human readable time.
Human readable time example:
```php
$datetime = \Carbon\Carbon::parse('2021-05-05 10:30:00')->subMinutes(15);
```
Output:
```html
```
Date time example:
```php
$datetime = \Carbon\Carbon::parse('2021-05-05 10:30:00')->subMinutes(90);
```
Output:
```html
```
You can adjust the time when the date time is displayed. The default time is 1 hour.
```php
$datetime = \Carbon\Carbon::parse('2021-05-05 10:30:00')->subMinutes(120);
```
Output:
```html
```
## Requirements
- Laravel 9.x or Laravel 10.x
- PHP 8.x
## Installation
You can install the package via composer:
```bash
composer require poldixd/human-readable-time
```
## Testing
```bash
composer test
```
## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Credits
- [Nils Poltmann](https://github.com/poldixd)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.