ILIAS
Release_3_10_x_branch Revision 61812
|
Public Member Functions | |
ilFormat () | |
getDateDE () | |
input2date ($AInputDate) | |
Prft eingegebes Datum und wandelt es in DB-konformen Syntax um Eingabe: TT.MM.JJJJ oder T.M.JJ oder TT.MM.JJJJ HH:MM:SS oder T.M.JJ HH:MM:SS Bei zweistelliger Jahresangabe wird bei YY > 70 19, bei YY < 70 20 vorgestellt Ausgabe: YYYY-MM-DD oder YYYY-MM-DD HH:MM:SS OPTIONAL wird die aktuelle Systemzeit hinzugefgt (Ausgabe: YYYY-MM-DD hh:mm:ss) | |
dateDB2timestamp ($ADatumSQL) | |
db-datetime to timestamp | |
dateDE2timestamp ($ADatum) | |
German datetime to timestamp. | |
fdateDB2dateDE ($t) | |
formats db-datetime to german date | |
ftimestamp2dateDE ($t) | |
formats timestamp to german date | |
ftimestamp2datetimeDE ($t) | |
formats timestamp to german datetime | |
ftimestamp2dateDB ($t) | |
formats timestamp to db-date | |
ftimestamp2datetimeDB ($aTimestamp) | |
Timestamp to database datetime. | |
compareDates ($ADate1, $ADate2) | |
Datum vergleichen Erwartet timestamps Liefert das aktuellere Datum als Timestamp zurck. | |
checkDecimal ($var) | |
Prft Zahlen mit Nachkommastellen und erlaubt ein Komma als Nachstellentrenner. | |
fGeld () | |
formatiert Geldwerte (Format: 00,00 + Eurosymbol). | |
fProzent () | |
formatiert Prozentzahlen (Format: 00,00%). | |
runden ($value) | |
Floats auf 2 Nachkommastellen runden. | |
fmtDateTime ($a_str, $a_dateformat, $a_timeformat, $a_mode="datetime", $a_relative=TRUE) | |
formatting function for dates | |
fmtFloat ($a_float, $a_decimals="", $a_th="") | |
format a float | |
unixtimestamp2datetime ($a_unix_timestamp="") | |
formatDate ($a_date, $a_mode="datetime", $a_omit_seconds=false, $a_relative=TRUE) | |
format a date according to the user language shortcut for Format::fmtDateTime public | |
formatUnixTime ($ut, $with_time=false) | |
dateDiff ($a_ts1, $a_ts2) | |
datetime2unixTS ($a_datetime) | |
converts datetime to a unix timestamp | |
_secondsToString ($seconds) | |
converts seconds to string: Long: 7 days 4 hour(s) ... | |
_secondsToShortString ($seconds) | |
converts seconds to string: Long: 7 days 4 hour(s) ... |
Definition at line 42 of file class.ilFormat.php.
ilFormat::_secondsToShortString | ( | $seconds | ) |
converts seconds to string: Long: 7 days 4 hour(s) ...
string | datetime |
Definition at line 596 of file class.ilFormat.php.
Referenced by ilObjUserFolderGUI\_addLearningProgressWorksheet(), and ilObjUserFolderGUI\learningProgressObject().
ilFormat::_secondsToString | ( | $seconds | ) |
converts seconds to string: Long: 7 days 4 hour(s) ...
string | datetime |
Definition at line 544 of file class.ilFormat.php.
Referenced by ilLearningProgressBaseGUI\__appendLPDetails(), ilLPListOfProgressGUI\__appendUserInfo(), ilCourseContentGUI\__renderItem(), ilCourseContentGUI\__renderUserItem(), ilLearningProgressBaseGUI\__showObjectDetails(), ilInfoScreenGUI\addMetaDataSections(), ilCourseContentGUI\editTimings(), ilCalendarChangedAppointmentsTableGUI\fillRow(), ilCalendarAppointmentsTableGUI\fillRow(), ilObjSCORM2004LearningModule\getTrackingDataAgg(), ilObjUserTrackingGUI\outputTrackingDataObject(), ilLPItemListGUI\renderObjectInfo(), ilLPItemListGUI\renderObjectInfoXML(), and ilInfoScreenGUI\showLearningProgress().
ilFormat::checkDecimal | ( | $var | ) |
Prft Zahlen mit Nachkommastellen und erlaubt ein Komma als Nachstellentrenner.
string |
Definition at line 234 of file class.ilFormat.php.
Referenced by ilPaymentCouponGUI\saveCouponForm().
ilFormat::compareDates | ( | $ADate1, | |
$ADate2 | |||
) |
Datum vergleichen Erwartet timestamps Liefert das aktuellere Datum als Timestamp zurck.
string | |
string |
Definition at line 219 of file class.ilFormat.php.
ilFormat::dateDB2timestamp | ( | $ADatumSQL | ) |
db-datetime to timestamp
string |
Definition at line 127 of file class.ilFormat.php.
References $timestamp.
ilFormat::dateDE2timestamp | ( | $ADatum | ) |
German datetime to timestamp.
string |
Definition at line 143 of file class.ilFormat.php.
References $timestamp.
ilFormat::dateDiff | ( | $a_ts1, | |
$a_ts2 | |||
) |
Definition at line 490 of file class.ilFormat.php.
ilFormat::datetime2unixTS | ( | $a_datetime | ) |
converts datetime to a unix timestamp
string | datetime |
Definition at line 528 of file class.ilFormat.php.
ilFormat::fdateDB2dateDE | ( | $t | ) |
ilFormat::fGeld | ( | ) |
formatiert Geldwerte (Format: 00,00 + Eurosymbol).
Weiteres siehe fProzent
Definition at line 243 of file class.ilFormat.php.
References $test.
ilFormat::fmtDateTime | ( | $a_str, | |
$a_dateformat, | |||
$a_timeformat, | |||
$a_mode = "datetime" , |
|||
$a_relative = TRUE |
|||
) |
formatting function for dates
In different languages, dates are formatted different. fmtDate expects a sql timestamp and a date format. Optional you may specify a time format. If you skip this parameter no time is displayed The format options follows the rules of the PHP date-function. See in the PHP manual for a list of possible formatting options public
string | date date, given in sql-format YYYY-MM-DD HH:MM:SS |
string | date format (default is Y-m-d) |
string | time format (default is H:i:s) |
string | format mode (datetime, time or date) |
boolean | relative date output |
Definition at line 308 of file class.ilFormat.php.
References $d, $lng, and $timestamp.
Referenced by formatDate().
ilFormat::fmtFloat | ( | $a_float, | |
$a_decimals = "" , |
|||
$a_th = "" |
|||
) |
format a float
this functions takes php's number_format function and formats the given value with appropriate thousand and decimal separator. public
float | the float to format |
integer | count of decimals |
integer | display thousands separator |
Definition at line 392 of file class.ilFormat.php.
Referenced by ilObjFileAccess\_sizeToString().
ilFormat::formatDate | ( | $a_date, | |
$a_mode = "datetime" , |
|||
$a_omit_seconds = false , |
|||
$a_relative = TRUE |
|||
) |
format a date according to the user language shortcut for Format::fmtDateTime public
string | sql date |
string | format mode |
boolean | Relative date output |
Definition at line 437 of file class.ilFormat.php.
References $lng, and fmtDateTime().
Referenced by ilObjExercise\__formatBody(), ilFileDataImportForum\__readFiles(), ilFileDataImportMail\__readFiles(), ilFileDataImportGroup\__readFiles(), ilQuestionpoolExport\buildExportFileXLS(), ilTestCertificate\exchangeCertificateVariables(), ilObjCourseGUI\fetchPrintMemberData(), ilShopTopicsTableGUI\fillRow(), ilFileDataExercise\getFiles(), ilFileDataForum\getFiles(), ilFileDataForum\getFilesOfPost(), ilFileDataMail\getUnsentFiles(), ilObjUserGUI\getValues(), ilLMStatisticsGUI\listUsersGroup(), ilLMStatisticsGUI\listUsersRole(), ilTestCertificate\outCertificate(), ilLMStatisticsGUI\search(), ilPaymentCouponGUI\showCoupons(), and ilObjectGUI\viewObject().
ilFormat::formatUnixTime | ( | $ut, | |
$with_time = false |
|||
) |
Definition at line 470 of file class.ilFormat.php.
References $lng.
Referenced by ilPDFPresentation\__addMain(), ilPDFPresentation\__createObjectDetails(), ilMemberExport\createCSV(), ilECSSettingsGUI\exportImported(), ilECSSettingsGUI\exportReleased(), and ilObjCourseGUI\printMembersObject().
ilFormat::fProzent | ( | ) |
formatiert Prozentzahlen (Format: 00,00%).
Wenn nix oder eine Null bergeben wird, wird ein Leerzeichen zurckgegeben Wenn mehr als ein Parameter bergeben wird, wird die Ausgabe auch bei Wert Null erzwungen
Definition at line 265 of file class.ilFormat.php.
References $test.
ilFormat::ftimestamp2dateDB | ( | $t | ) |
formats timestamp to db-date
string |
Definition at line 190 of file class.ilFormat.php.
References $t.
Referenced by ilQuestionpoolExport\buildExportFileXLS().
ilFormat::ftimestamp2dateDE | ( | $t | ) |
ilFormat::ftimestamp2datetimeDB | ( | $aTimestamp | ) |
Timestamp to database datetime.
string | $aTimestamp | String in timestamp format |
Definition at line 201 of file class.ilFormat.php.
Referenced by ilTestOutputGUI\endingTimeReached(), and ilObjTest\isExecutable().
ilFormat::ftimestamp2datetimeDE | ( | $t | ) |
ilFormat::getDateDE | ( | ) |
Definition at line 50 of file class.ilFormat.php.
ilFormat::ilFormat | ( | ) |
Definition at line 44 of file class.ilFormat.php.
ilFormat::input2date | ( | $AInputDate | ) |
Prft eingegebes Datum und wandelt es in DB-konformen Syntax um Eingabe: TT.MM.JJJJ oder T.M.JJ oder TT.MM.JJJJ HH:MM:SS oder T.M.JJ HH:MM:SS Bei zweistelliger Jahresangabe wird bei YY > 70 19, bei YY < 70 20 vorgestellt Ausgabe: YYYY-MM-DD oder YYYY-MM-DD HH:MM:SS OPTIONAL wird die aktuelle Systemzeit hinzugefgt (Ausgabe: YYYY-MM-DD hh:mm:ss)
string |
Definition at line 65 of file class.ilFormat.php.
References $d.
Referenced by ilObjGroup\setExpirationDateTime().
ilFormat::runden | ( | $value | ) |
Floats auf 2 Nachkommastellen runden.
float |
Definition at line 286 of file class.ilFormat.php.
ilFormat::unixtimestamp2datetime | ( | $a_unix_timestamp = "" | ) |
Definition at line 414 of file class.ilFormat.php.
Referenced by ilTestCertificate\exchangeCertificateVariables(), and ilTestCertificate\outCertificate().