neuron-php / formatting
Data formatters..
Installs: 13 545
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- ext-curl: *
- ext-json: *
Requires (Dev)
- phpunit/phpunit: 9.*
This package is auto-updated.
Last update: 2024-12-16 17:48:07 UTC
README
Formatting
Currency
$Formatter = new Currency();
$Formatter->setPadLength( 6 );
echo $Formatter->format( 5 );
__5.00
Date
$Formatter = new Date();
echo $Formatter->format( '12/23/2018')
2018-12-23
DateTime
$Formatter = new DateTime();
echo $Formatter->format( '12/23/2018 13:30')
2018-12-23 1:30 pm
Time
$Formatter = new Time();
echo $Formatter->format( '13:30' )
1:30 pm
PhoneNumber
$Formatter = new PhoneNumber();
echo $Formatter->format( "1234567890" )
(123) 456-7890"