forked from Wavyzz/dolibarr
Complete substitution with __NOW_TMS__
This commit is contained in:
@@ -8013,7 +8013,9 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
||||
if (empty($exclude) || !in_array('date', $exclude)) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
|
||||
$tmp = dol_getdate(dol_now(), true);
|
||||
$now = dol_now();
|
||||
|
||||
$tmp = dol_getdate($now, true);
|
||||
$tmp2 = dol_get_prev_day($tmp['mday'], $tmp['mon'], $tmp['year']);
|
||||
$tmp3 = dol_get_prev_month($tmp['mon'], $tmp['year']);
|
||||
$tmp4 = dol_get_next_day($tmp['mday'], $tmp['mon'], $tmp['year']);
|
||||
@@ -8022,6 +8024,8 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
||||
$daytext = $outputlangs->trans('Day'.$tmp['wday']);
|
||||
|
||||
$substitutionarray = array_merge($substitutionarray, array(
|
||||
'__NOW_TMS__' => (int) $now,
|
||||
'__NOW_TMS_YMD__' => dol_print_date($now, 'day', 0, $outputlangs),
|
||||
'__DAY__' => (string) $tmp['mday'],
|
||||
'__DAY_TEXT__' => $daytext, // Monday
|
||||
'__DAY_TEXT_SHORT__' => dol_trunc($daytext, 3, 'right', 'UTF-8', 1), // Mon
|
||||
|
||||
Reference in New Issue
Block a user