ordenes trabajo

This commit is contained in:
amazuecos
2025-01-02 10:50:56 +01:00
parent 340ab4ec5f
commit b50ba4f2a3
57 changed files with 3005 additions and 417 deletions

View File

@ -0,0 +1,25 @@
<?php
// app/Helpers/info_helper.php
use CodeIgniter\CodeIgniter;
function float_seconds_to_hhmm_string(?float $time):?string
{
$time_str = null;
if($time){
$time_str = sprintf("%02d:%02d",$time/3600,floor($time/60)%60);
}
return $time_str;
}
function week_day_humanize(int $week_day,bool $upper = false) : string
{
$week_days = ["Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"];
$week_day_string = "";
if(in_array($week_day,range(0,6))){
$week_day_string = $week_days[$week_day];
}
if($upper){
$week_day_string = strtoupper($week_day_string);
}
return $week_day_string;
}