Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
fredbradley committed Apr 9, 2021
1 parent 32af2c4 commit ca656b7
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Easy Time

[![Latest Version on Packagist](https://img.shields.io/packagist/v/fredbradley/easytime.svg?style=flat-square)](https://packagist.org/packages/fredbradley/easytime)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
![StyleCI Status](https://github.styleci.io/repos/356180937/shield)
[![Total Downloads](https://img.shields.io/packagist/dt/fredbradley/easytime.svg?style=flat-square)](https://packagist.org/packages/fredbradley/easytime)

A small class based package to help with human-readable calculations of time.

For when you need to convert a human-readable number of minutes or seconds into an integer of seconds (for example expiry time on a Cache object)
## Installation

You can install the package via composer:

```bash
composer require fredbradley/easytime
```

## Usage Examples

``` php
use FredBradley\EasyTime\EasySeconds;

$seconds = EasySeconds::AN_HOUR; // returns 3600
$seconds = EasySeconds::hours(2); // return 7200

// What to know how many minutes in a year?
$minutes = EasyMinutes::A_YEAR;

// And if you want to you can mix them together...
$seconds = EasySeconds::minutes(EasyMinutes::AN_HOUR); // return 3600

```

Pull requests open for people who find this useful and what to build more.

### Testing

``` bash
composer test
```

### Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

If you discover any security related issues, please email code@fredbradley.co.uk instead of using the issue tracker.

## Credits

- [Fred Bradley](https://github.com/fredbradley)
- [All Contributors](../../contributors)

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

0 comments on commit ca656b7

Please sign in to comment.