Skip to content

Commit 4f7cf5a

Browse files
author
Pharaonic
authored
add DecInt
1 parent 7459802 commit 4f7cf5a

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/Helpers.php

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,29 @@ function ReadableHumanNumber(int $input, bool $showDecimal = false, int $decimal
4343
*
4444
* @param int $input
4545
* @param int $decimals
46+
* @param string $point
47+
* @param string $delimiter
4648
* @return string
4749
**/
4850
function ReadableDecimal($input, int $decimals = 2, string $point = '.', string $delimiter = ','): ?string
4951
{
5052
return Readable::getDecimal($input, $decimals, $point, $delimiter);
5153
}
5254

55+
/**
56+
* Get Readable ( Decimal Number => Decimal || Integer )
57+
*
58+
* @param int $input
59+
* @param int $decimals_length
60+
* @param string $point
61+
* @param string $delimiter
62+
* @return string
63+
**/
64+
function ReadableDecInt($input, int $decimals_length = 2, string $point = '.', string $delimiter = ','): ?string
65+
{
66+
return Readable::getDecInt($input, $decimals_length, $point, $delimiter);
67+
}
68+
5369
// DATE & TIME
5470

5571
/**
@@ -87,7 +103,6 @@ function ReadableTime($input, $is12 = false, bool $hasSeconds = false, string $t
87103
function ReadableDateTime($input, $is12 = false, bool $hasSeconds = false, string $timezone = null): ?string
88104
{
89105
return Readable::getDateTime($input, $is12, $hasSeconds, $timezone);
90-
91106
}
92107

93108
/**
@@ -101,7 +116,6 @@ function ReadableDateTime($input, $is12 = false, bool $hasSeconds = false, stri
101116
function ReadableDiffDateTime($old, $new = null, string $timezone = null): ?string
102117
{
103118
return Readable::getDiffDateTime($old, $new, $timezone);
104-
105119
}
106120

107121
/**

0 commit comments

Comments
 (0)