Skip to content

Commit

Permalink
Release version 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hungnguyenhp committed Sep 23, 2021
1 parent 40aec8e commit 22f6417
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
strategy:
matrix:
operating-system: [ ubuntu-latest, windows-latest, macos-latest ]
php-versions: [ '5.6', '7.0', '8.0' ]
php-versions: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0' ]
runs-on: ${{ matrix.operating-system }}
steps:
- name: Checkout
Expand Down
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@
}
],
"require": {
"php": ">=5.6",
"php": ">=7.0",
"ext-mbstring": "*"
},
"require-dev": {
"nesbot/carbon": "^2 || ^1",
"kint-php/kint": ">=3.0"
},
"autoload": {
"psr-4": {
"nguyenanhung\\Libraries\\DateAndTime\\": "src/"
Expand Down
6 changes: 3 additions & 3 deletions src/DateAndTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static function zuluTime()
* @time : 2019-07-15 10:57
*
*/
public static function expireTime($duration = 1)
public static function expireTime(int $duration = 1): string
{
try {
$expire = $duration <= 1 ? new DateTime("+0 days") : new DateTime("+$duration days");
Expand All @@ -76,7 +76,7 @@ public static function expireTime($duration = 1)
* @time : 2018-12-06 16:03
*
*/
public static function generateOTPExpireTime($hour = 4)
public static function generateOTPExpireTime(int $hour = 4): string
{
$time = new DateTime('+' . $hour . ' days');

Expand All @@ -93,7 +93,7 @@ public static function generateOTPExpireTime($hour = 4)
* @copyright: 713uk13m <dev@nguyenanhung.com>
* @time : 09/22/2021 25:54
*/
public static function filterDate($inputDate = '')
public static function filterDate(string $inputDate = ''): array
{
if ($inputDate !== '') {
// Get date
Expand Down

0 comments on commit 22f6417

Please sign in to comment.