mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-24 10:21:32 +01:00
Fix: datepicker first day of week can be monday by setting into
display setup
This commit is contained in:
@@ -1028,6 +1028,8 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e
|
||||
*/
|
||||
function dol_getdate($timestamp,$fast=false)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$usealternatemethod=false;
|
||||
if ($timestamp <= 0) $usealternatemethod=true; // <= 1970
|
||||
if ($timestamp >= 2145913200) $usealternatemethod=true; // >= 2038
|
||||
@@ -1039,6 +1041,19 @@ function dol_getdate($timestamp,$fast=false)
|
||||
else
|
||||
{
|
||||
$arrayinfo=getdate($timestamp);
|
||||
|
||||
$startday=isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:1;
|
||||
if($startday==1)
|
||||
{
|
||||
if ($arrayinfo["wday"]==0)
|
||||
{
|
||||
$arrayinfo["wday"]=6;
|
||||
}
|
||||
else
|
||||
{
|
||||
$arrayinfo["wday"]=$arrayinfo["wday"]-1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $arrayinfo;
|
||||
|
||||
Reference in New Issue
Block a user