Commit e11f5dde authored by redray's avatar redray
Browse files

improved displaying of dates.

parent 727ff9f0
......@@ -38,7 +38,6 @@ class listform {
private $pagingValues;
private $searchChanged = 0;
private $module;
private $dateformat = 'Y-m-d H:i';
public $wordbook;
public function loadListDef($file, $module = '')
......@@ -280,7 +279,25 @@ class listform {
break;
case 'DATE':
$record[$key] = ($record[$key] > 0) ? date($this->dateformat,$record[$key]) : '';
if ($record[$key] > 0) {
// is value int?
if (ereg("^[0-9]+[.]?[0-9]*$", $record[$key], $p)) {
$record[$key] = date($this->lng('conf_format_dateshort'), $record[$key]);
} else {
$record[$key] = date($this->lng('conf_format_dateshort'), strtotime($record[$key]));
}
}
break;
case 'DATETIME':
if ($record[$key] > 0) {
// is value int?
if (ereg("^[0-9]+[.]?[0-9]*$", $record[$key], $p)) {
$record[$key] = date($this->lng('conf_format_datetime'), $record[$key]);
} else {
$record[$key] = date($this->lng('conf_format_datetime'), strtotime($record[$key]));
}
}
break;
case 'INTEGER':
......@@ -322,8 +339,13 @@ class listform {
case 'DATE':
if($record[$key] > 0) {
list($tag,$monat,$jahr) = explode('.',$record[$key]);
$record[$key] = mktime(0,0,0,$monat,$tag,$jahr);
$record[$key] = date('Y-m-d',strtotime($record[$key]));
}
break;
case 'DATETIME':
if($record[$key] > 0) {
$record[$key] = date('Y-m-d H:i:s',strtotime($record[$key]));
}
break;
......
<?php
$wb['conf_format_dateshort'] = 'Y-m-d';
$wb['conf_format_datelong'] = 'l dS of F Y';
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'Y-m-d H:i';
$wb['301'] = 'Този модул не е разрешен за текущия потреител.';
$wb['302'] = 'Невалиден модул.';
$wb['1001'] = 'Потребителското име и паролата не могат да бъдат празни!';
......
<?php
$wb['conf_format_dateshort'] = 'd.m.Y';
$wb['conf_format_datelong'] = 'l, d. F Y';
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'd.m.Y H:i';
$wb['301'] = 'Modul für Benutzer nicht erlaubt.';
$wb['302'] = 'Modul ungültig.';
$wb['1001'] = 'Der Benutzername und das Passwort dürfen nicht leer sein!';
......
<?php
$wb['conf_format_dateshort'] = 'Y-m-d';
$wb['conf_format_datelong'] = 'l dS of F Y';
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'Y-m-d H:i';
$wb['301'] = 'Module not permitted for the current user.';
$wb['302'] = 'Module invalid.';
$wb['1001'] = 'The username and password cannot be empty !';
......
<?php
$wb['conf_format_dateshort'] = 'Y-m-d';
$wb['conf_format_datelong'] = 'l dS of F Y';
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'Y-m-d H:i';
$wb['301'] = 'Modulo no permitido para el usuario actual.';
$wb['302'] = 'Modulo inválido.';
$wb['1001'] = '¡ El usuario y contraseña no pueden estar vacíos !';
......
<?php
$wb['conf_format_dateshort'] = 'Y-m-d';
$wb['conf_format_datelong'] = 'l dS of F Y';
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'Y-m-d H:i';
$wb['301'] = 'Tämä moduuli ei ole sallittu nykyiselle käyttäjälle.';
$wb['302'] = 'Viallinen moduuli.';
$wb['1001'] = 'Käyttäjätunnus ja/tai salasana eivät voi olla tyhjiä!';
......
<?php
$wb['conf_format_dateshort'] = 'Y-m-d';
$wb['conf_format_datelong'] = 'l dS of F Y';
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'Y-m-d H:i';
$wb['301'] = 'Module interdit pour lutilisateur courant.';
$wb['302'] = 'Module invalide.';
$wb['1001'] = 'The username and password must not be empty!';
......
<?php
$wb['conf_format_dateshort'] = 'Y-m-d';
$wb['conf_format_datelong'] = 'l dS of F Y';
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'Y-m-d H:i';
$wb['301'] = 'Modulo non permesso per l`utente corrente.';
$wb['302'] = 'Modulo non valido.';
$wb['1001'] = 'Nome utente e password non possono essere vuoti!';
......
<?php
$wb['conf_format_dateshort'] = 'Y-m-d';
$wb['conf_format_datelong'] = 'l dS of F Y';
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'Y-m-d H:i';
$wb['301'] = 'Module niet toegestaan voor de huidige gebruiker.';
$wb['302'] = 'Ongeldige module.';
$wb['1001'] = 'De gebruikersnaam en wachtwoord kunnen niet leeg zijn!';
......
<?php
$wb['conf_format_dateshort'] = 'Y-m-d';
$wb['conf_format_datelong'] = 'l dS of F Y';
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'Y-m-d H:i';
$wb['301'] = 'Модуль недоступен для данной учетной записи.';
$wb['302'] = 'Модуль неправилен.';
$wb['1001'] = 'Имя или пароль не должны быть пустыми!';
......
<?php
$wb['conf_format_dateshort'] = 'Y-m-d';
$wb['conf_format_datelong'] = 'l dS of F Y';
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'Y-m-d H:i';
$wb['301'] = 'Modulen r ej tillten fr nuvarande anvndare.';
$wb['302'] = 'Modulen r ogiltig.';
$wb['1001'] = 'Anvndarnamn och lsenord fr ej vara tomma!';
......
......@@ -45,7 +45,7 @@ $liste['auth'] = 'no';
*****************************************************/
$liste["item"][] = array( 'field' => "tstamp",
'datatype' => "DATE",
'datatype' => "DATETIME",
'formtype' => "TEXT",
'op' => "like",
'prefix' => "",
......
......@@ -44,7 +44,7 @@ $liste['auth'] = 'no';
*****************************************************/
$liste["item"][] = array( 'field' => "tstamp",
'datatype' => "DATE",
'datatype' => "DATETIME",
'formtype' => "TEXT",
'op' => "like",
'prefix' => "",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment