Skip to content

Commit ba314aa

Browse files
committed
Update README.md
1 parent cb6371e commit ba314aa

1 file changed

Lines changed: 38 additions & 31 deletions

File tree

README.md

Lines changed: 38 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,60 @@
1-
# Very short description of the package
1+
# Seconds
22

3-
[![Latest Version on Packagist](https://img.shields.io/packagist/v/035media/seconds.svg?style=flat-square)](https://packagist.org/packages/035media/seconds)
4-
[![Build Status](https://img.shields.io/travis/035media/seconds/master.svg?style=flat-square)](https://travis-ci.org/035media/seconds)
5-
[![Quality Score](https://img.shields.io/scrutinizer/g/035media/seconds.svg?style=flat-square)](https://scrutinizer-ci.com/g/035media/seconds)
6-
[![Total Downloads](https://img.shields.io/packagist/dt/035media/seconds.svg?style=flat-square)](https://packagist.org/packages/035media/seconds)
3+
[![Latest Version on Packagist](https://img.shields.io/packagist/v/adevade/seconds.svg?style=flat-square)](https://packagist.org/packages/adevade/seconds)
4+
[![Total Downloads](https://img.shields.io/packagist/dt/adevade/seconds.svg?style=flat-square)](https://packagist.org/packages/adevade/seconds)
75

8-
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.
6+
Helpers for converting time to seconds.
97

108
## Installation
119

1210
You can install the package via composer:
1311

1412
```bash
15-
composer require 035media/seconds
13+
composer require adevade/seconds
1614
```
1715

1816
## Usage
1917

20-
``` php
21-
// Usage description here
22-
```
23-
24-
### Testing
18+
```php
19+
use Adevade\Seconds\Seconds;
2520

26-
``` bash
27-
composer test
21+
Seconds::fromMinutes(2); // returns => (int) 120
2822
```
2923

30-
### Changelog
31-
32-
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
33-
34-
## Contributing
24+
### Available methods
25+
26+
```php
27+
Seconds::fromMinutes($int);
28+
Seconds::fromHours($int);
29+
Seconds::fromDays($int);
30+
Seconds::fromWeeks($int);
31+
Seconds::fromMonths($int);
32+
Seconds::fromYears($int);
33+
34+
Seconds::fromMinute();
35+
Seconds::fromHour();
36+
Seconds::fromDay();
37+
Seconds::fromWeek();
38+
Seconds::fromMonth();
39+
Seconds::fromYear();
40+
```
3541

36-
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
42+
### Available constants
3743

38-
### Security
44+
```php
45+
Seconds::MINUTE;
46+
Seconds::HOUR;
47+
Seconds::DAY;
48+
Seconds::WEEK;
49+
Seconds::MONTH;
50+
Seconds::YEAR;
51+
```
3952

40-
If you discover any security related issues, please email andreas@035media.se instead of using the issue tracker.
53+
> Months have an average length of 30.42 days.\
54+
> Years have an average length of 365.24 days.
4155
4256
## Credits
4357

44-
- [Andréas Lundgren](https://github.com/035media)
45-
- [All Contributors](../../contributors)
46-
47-
## License
48-
49-
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
50-
51-
## PHP Package Boilerplate
58+
- [Andréas Lundgren](https://github.com/adevade)
5259

53-
This package was generated using the [PHP Package Boilerplate](https://laravelpackageboilerplate.com).
60+
Idea came from [this tweet by @LasseRafn](https://twitter.com/LasseRafn/status/1225017098373685255). Thanks!

0 commit comments

Comments
 (0)