This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function number_to_string($number): string | |
{ | |
$whole = floor($number); | |
$decimal = bcsub($number, $whole, 2); | |
$decimalPrefix = (-1 === bccomp($decimal, 0.1, 2)) ? 'zéro ' : ''; | |
$decimal = bcmul($decimal, 100, 2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!defined('BASEPATH')) | |
exit('No direct script access allowed'); | |
if (!function_exists('number_str')) { | |
function number_str($number) { | |
$strp = strpos($number, '.'); | |
$n = $strp > 0 ? substr($number, 0, $strp) : $number; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Arabic initialisation for the jQuery UI date picker plugin. | |
* Written by M. EZZAIRI (med.ezzairi{at}gmail.com) | |
* | |
*/ | |
jQuery(function($){ | |
$.datepicker.regional['ar'] = { | |
closeText: 'أغلق', | |
prevText: 'السابق', | |
nextText: 'التالي', | |
currentText: 'اليوم', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Rules; | |
use Illuminate\Contracts\Validation\Rule; | |
/** | |
* RIB validation (valide in morocco only) | |
* | |
* @author med-ezzairi | |
* |