|
1 | | - |
2 | | - |
3 | | -Design a simple and expressive logo with the same model you see above, |
4 | | -the logo design helps to unify the visual identity and further develop the optimal packages to increase the quality of the software we develop |
5 | | - |
6 | | -#NOTES: |
7 | | -* You should replace all your dependencies into your custom names and files including: |
8 | | - * vendor namespace. |
9 | | - * composer information. |
10 | | - * logo |
11 | | - * credit and contributors links |
12 | | - * security email |
13 | | -* To use this template, please click on button above "Use this template". |
14 | | -* Delete this section after you have finished developing your package |
15 | | - |
16 | | -# Package Name |
17 | | -Your package description,Try to be briefly describing the features of the package, |
18 | | -and if there are external resources for learning or explanation |
| 1 | +# Arabic Diff For Humans |
| 2 | +PHP Package to convert time difference to Arabic human readable string |
19 | 3 |
|
20 | 4 | ##### 1 - Dependency |
21 | 5 | The first step is using composer to install the package and automatically update your composer.json file, you can do this by running: |
22 | 6 |
|
23 | 7 | ```shell |
24 | | -composer require vendor_name/package_name |
| 8 | +composer require syrian-open-source/php-arabic-diff-for-human |
25 | 9 | ``` |
26 | 10 |
|
27 | | -Features Or Usage |
| 11 | +Usage |
28 | 12 | ----------- |
29 | | -Put the name of the feature and a link to this feature |
30 | | -- [Any feature](https://github.com/syrian-open-source/php-package-template/blob/main/docs/feature.md#usage) |
31 | | - |
| 13 | +Convert from string date, this feature will work to compare years, months,days,minutes, and seconds. |
| 14 | +You can pass the date as a string with any format. |
| 15 | +```php |
| 16 | + $instance = (new ArabicDiffForHumans()); |
| 17 | + $time = "2018-1-1"; |
| 18 | + echo $instance->getFromDateString($time); |
| 19 | + // the result should be: "منذ 4 سنين" |
| 20 | +``` |
| 21 | +Convert from string date, this feature will work to compare years, months,days,minutes, and seconds. |
| 22 | +You can pass the date as a string with any format. |
| 23 | +```php |
| 24 | + $instance = (new ArabicDiffForHumans()); |
| 25 | + $time = "2018-1-1"; |
| 26 | + echo $instance->get(strtotime($time)); |
| 27 | + // the result should be: "منذ 4 سنين" |
| 28 | +``` |
32 | 29 |
|
33 | 30 | Changelog |
34 | 31 | --------- |
35 | | -Please see the [CHANGELOG](https://github.com/syrian-open-source/php-package-template/blob/master/CHANGELOG.md) for more information about what has changed or updated or added recently. |
| 32 | +Please see the [CHANGELOG](https://github.com/syrian-open-source/php-arabic-diff-for-human/blob/master/CHANGELOG.md) for more information about what has changed or updated or added recently. |
36 | 33 |
|
37 | 34 | Security |
38 | 35 | -------- |
39 | | -If you discover any security related issues, please email them first to "your email", |
| 36 | +If you discover any security related issues, please email them first to [[email protected]]([email protected]), |
40 | 37 | if we do not fix it within a short period of time please open a new issue describing your problem. |
41 | 38 |
|
42 | 39 | Credits |
43 | 40 | ------- |
44 | | -* [your email](https://github.com/syrian-open-source/php-package-template/graphs/contributors) |
45 | | -* [All contributors](https://github.com/syrian-open-source/php-package-template/graphs/contributors) |
| 41 | +* [your email](https://www.linkedin.com/in/abdussalam-alali/) |
| 42 | +* [All contributors](https://github.com/syrian-open-source/php-arabic-diff-for-human/graphs/contributors) |
0 commit comments