27 $conf->global->SOCIETE_FISCAL_MONTH_START = 1;
33 $year_current = $current_date[
'year'];
34 $year_start = $year_current;
36 $year_current = $year;
42if (empty($date_start) || empty($date_end)) {
50 $date_start =
dol_time_plus_duree(
dol_get_first_day($year_start, $current_date[
'mon'],
false), -3 - (($current_date[
'mon'] - $conf->global->SOCIETE_FISCAL_MONTH_START) % 3),
'm');
53 if ($current_date[
'mon'] < $conf->global->SOCIETE_FISCAL_MONTH_START) {
54 if (($conf->global->SOCIETE_FISCAL_MONTH_START - $current_date[
'mon']) > 6) {
58 if (($current_date[
'mon'] - $conf->global->SOCIETE_FISCAL_MONTH_START) < 6) {
62 $date_start =
dol_get_first_day($year_start, $conf->global->SOCIETE_FISCAL_MONTH_START,
'tzserver');
92$date_start_day = $tmp[
'mday'];
93$date_start_month = $tmp[
'mon'];
94$date_start_year = $tmp[
'year'];
96$date_end_day = $tmp[
'mday'];
97$date_end_month = $tmp[
'mon'];
98$date_end_year = $tmp[
'year'];
dol_get_first_day($year, $month=1, $gm=false)
Return GMT time for first day of a month or year.
dol_time_plus_duree($time, $duration_value, $duration_unit, $ruleforendofmonth=0)
Add a delay to a date.
dol_get_last_day($year, $month=12, $gm=false)
Return GMT time for last day of a month or year.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
dol_now($mode='auto')
Return date for now.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
dol_getdate($timestamp, $fast=false, $forcetimezone='')
Return an array with locale date info.