ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
Class for date presentation. More...
Static Public Member Functions | |
static | setUseRelativeDates ($a_status) |
set use relative dates More... | |
static | useRelativeDates () |
check if relative dates are used More... | |
static | setLanguage ($a_lng) |
set language More... | |
static | getLanguage () |
set language More... | |
static | resetToDefaults () |
reset to defaults More... | |
static | formatDate (ilDateTime $date) |
Format a date public. More... | |
static | formatPeriod (ilDateTime $start, ilDateTime $end) |
Format a period of two date Shows: 14. More... | |
static | isToday (ilDateTime $date) |
Check if date is "today". More... | |
static | isYesterday (ilDateTime $date) |
Check if date is yesterday. More... | |
static | isTomorrow (ilDateTime $date) |
Check if date is tomorrow. More... | |
static | secondsToString ($seconds, $force_with_seconds=false, $a_lng=null) |
converts seconds to string: Long: 7 days 4 hour(s) ... More... | |
Static Public Attributes | |
static | $use_relative_dates = true |
static | $today = null |
static | $tomorrow = null |
static | $yesterday = null |
Static Private Attributes | |
static | $lang = null |
Class for date presentation.
Definition at line 35 of file class.ilDatePresentation.php.
|
static |
Format a date public.
object | $date | ilDate or ilDateTime |
Definition at line 113 of file class.ilDatePresentation.php.
References $ilUser, $lng, ilCalendarUtil\_numericMonthToString(), ilDateTime\get(), IL_CAL_FKT_DATE, IL_CAL_FKT_GETDATE, ilDateTime\isNull(), ilCalendarSettings\TIME_FORMAT_12, and ilCalendarSettings\TIME_FORMAT_24.
Referenced by ilLearningProgressBaseGUI\__appendLPDetails(), ilLearningProgressBaseGUI\__appendUserInfo(), ilChatroomHistoryGUI\__construct(), ilCourseContentGUI\__renderItem(), ilCourseContentGUI\__renderUserItem(), ilObjGroupAccess\_checkAccess(), ilObjCourseAccess\_checkAccess(), ilObject\_lookupLastUpdate(), ilObjRemoteFileGUI\addCustomInfoFields(), ilInfoScreenGUI\addObjectSections(), ilExAssignmentGUI\addSchedule(), ilExAssignmentGUI\addSubmission(), ilForumMailNotification\appendAttachments(), ilObjBookingPoolGUI\buildDatesBySchedule(), ilMailFolderGUI\cancelDeleteMails(), ilObjSurvey\canStartSurvey(), ilConsultationHoursGUI\confirmDelete(), ilMemberExportGUI\confirmDeleteExportFile(), ilSCORM2004ScoGUI\confirmDeleteExportFile(), ilObjSCORM2004LearningModuleGUI\confirmDeleteExportFile(), ilObjSurveyQuestionPoolGUI\confirmDeleteExportFileObject(), ilObjLanguageFolderGUI\confirmRefreshSelectedObject(), ilCalendarAppointmentGUI\confirmRegister(), ilConsultationHoursGUI\confirmRejectBooking(), ilCalendarAppointmentGUI\confirmUnregister(), ilForum\convertDate(), ilPersonalSettingsGUI\deleteOwnAccount4(), ilObjUser\deleteUserDefinedFieldEntries(), ilTestEvaluationGUI\detailedEvaluation(), ilObjForumGUI\doHistoryCheck(), ilPageObjectGUI\edit(), ilExSubmissionTextGUI\editAssignmentTextObject(), ilExPeerReviewGUI\editPeerReviewObject(), ilCourseContentGUI\editTimings(), ilTestPlayerAbstractGUI\endingTimeReached(), ilSurveyEvaluationGUI\evaluation(), ilSessionStatisticsGUI\exportCSV(), ilSurveyEvaluationGUI\exportEvaluationUser(), ilObjSurveyQuestionPoolGUI\exportObject(), ilObjUserFolderGUI\exportObject(), ilTestExport\exportToCSV(), ilECSSetting\fetchCertificateExpiration(), ilCourseRegistrationGUI\fillRegistrationPeriod(), ilGroupRegistrationGUI\fillRegistrationPeriod(), ilNewsForContextTableGUI\fillRow(), ilSubItemSelectionTableGUI\fillRow(), ilTestPersonalDefaultSettingsTableGUI\fillRow(), ilECSServerTableGUI\fillRow(), ilPublicSubmissionsTableGUI\fillRow(), ilHelpModuleTableGUI\fillRow(), ilPageHistoryTableGUI\fillRow(), ilExportSelectionTableGUI\fillRow(), ilAssessmentFolderLogTableGUI\fillRow(), ilForumDraftsTableGUI\fillRow(), ilTestHistoryTableGUI\fillRow(), ilMediaCastTableGUI\fillRow(), ilMemberExportFileTableGUI\fillRow(), ilHistoryTableGUI\fillRow(), ilTestPassManualScoringOverviewTableGUI\fillRow(), ilExcDeliveredFilesTableGUI\fillRow(), ilDclExportTableGUI\fillRow(), ilECSReleasedContentTableGUI\fillRow(), ilAdvancedMDRecordExportFilesTableGUI\fillRow(), ilECSImportedContentTableGUI\fillRow(), ilWikiRecentChangesTableGUI\fillRow(), ilLMDownloadTableGUI\fillRow(), ilLanguageTableGUI\fillRow(), ilCalendarInboxSharedTableGUI\fillRow(), ilWikiContributorsTableGUI\fillRow(), ilSCORMTrackingUsersTableGUI\fillRow(), ilFileVersionTableGUI\fillRow(), ilCalendarChangedAppointmentsTableGUI\fillRow(), ilSurveyCodesTableGUI\fillRow(), ilForumPostingDraftsBlockGUI\fillRow(), ilRbacLogTableGUI\fillRow(), ilUserLPTableGUI\fillRow(), ilExAssignmentTeamLogTableGUI\fillRow(), ilSurveyResultsUserTableGUI\fillRow(), ilSearchResultTableGUI\fillRow(), ilPollBlockGUI\fillRow(), ilTestFixedParticipantsTableGUI\fillRow(), ilAssignmentsTableGUI\fillRow(), ilTestParticipantsTableGUI\fillRow(), assFileUploadFileTableGUI\fillRow(), ilExAssignmentListTextTableGUI\fillRow(), ilSurveyMaintenanceTableGUI\fillRow(), ilQuestionPoolPrintViewTableGUI\fillRow(), ilGroupParticipantsTableGUI\fillRow(), ilSurveyAppraiseesTableGUI\fillRow(), ilPDNewsTableGUI\fillRow(), ilAdminSubItemsTableGUI\fillRow(), ilExportTableGUI\fillRow(), ilWikiPagesTableGUI\fillRow(), ilPDMailBlockGUI\fillRow(), ilExAssignmentPeerReviewTableGUI\fillRow(), ilSubscriberTableGUI\fillRow(), ilBadgePersonalTableGUI\fillRow(), ilCourseParticipantsTableGUI\fillRow(), ilWaitingListTableGUI\fillRow(), ilWebResourceEditableLinkTableGUI\fillRow(), ilPDNotesBlockGUI\fillRow(), ilSurveyQuestionsTableGUI\fillRow(), ilSurveyQuestionbrowserTableGUI\fillRow(), ilLPProgressTableGUI\fillRow(), ilBadgeUserTableGUI\fillRow(), ilTrUserObjectsPropsTableGUI\fillRow(), ilCronManagerTableGUI\fillRow(), ilWorkspaceShareTableGUI\fillRow(), ilQuestionBrowserTableGUI\fillRow(), ilNewsForContextBlockGUI\fillRow(), ilBookingReservationsTableGUI\fillRow(), ilTestQuestionBrowserTableGUI\fillRow(), ilUserTableGUI\fillRow(), ilLPProgressTableGUI\fillRowCSV(), ilBookingReservationsTableGUI\fillRowCSV(), ilTermsOfServiceAgreementByLanguageTableGUI\formatCellValue(), ilTermsOfServiceAcceptanceHistoryTableGUI\formatCellValue(), ilTestPassOverviewTableGUI\formatDate(), ilMailAttachmentTableGUI\formatValue(), ilObjTestGUI\formTimingObject(), ilCertificateAdapter\getBaseVariablesForPresentation(), ilCertificateAdapter\getBaseVariablesForPreview(), ilSkillCertificateAdapter\getCertificateVariablesForPresentation(), ilScormMailTemplateLPContext\getDescription(), ilCourseMailTemplateTutorContext\getDescription(), ilExSubmission\getDownloadedFilesInfoForTableGUIS(), ilPublicUserProfileGUI\getEmbeddable(), ilBlogExerciseGUI\getExerciseInfo(), ilPortfolioExerciseGUI\getExerciseInfo(), ilLPTableBaseGUI\getExportMeta(), ilADTDatePresentationBridge\getHTML(), ilADTDateTimePresentationBridge\getHTML(), ilAttendanceList\getHTML(), ilCloudPluginFileTreeGUI\getItemHtml(), ilRegistrationCodesTableGUI\getItems(), ilAccountCodesTableGUI\getItems(), ilBookingObjectsTableGUI\getItems(), ilUserTableGUI\getItems(), ilPollBlock\getMessage(), ilForumExplorerGUI\getNodeContent(), ilNoteGUI\getNoteListHTML(), ilExPeerReviewGUI\getOverviewContent(), ilExAssignmentGUI\getOverviewHeader(), ilNoteGUI\getPDNoteHTML(), ilObjSession\getPresentationTitle(), ilCourseMembershipGUI\getPrintMemberData(), ilObjFileListGUI\getProperties(), ilTestServiceGUI\getResultsSignature(), ilDclBaseRecordModel\getStandardFieldHTML(), ilObjSCORM2004LearningModule\getTrackingDataAgg(), ilObjUserGUI\getValues(), ilTestRandomQuestionSetConfigStateMessageHandler\handle(), ilExerciseManagementGUI\handleIndividualDeadlineCallsObject(), ilLMPresentationGUI\ilPage(), ilObjCourseGUI\infoScreen(), ilObjMediaCastGUI\infoScreen(), ilObjGroupGUI\infoScreen(), ilObjSurveyGUI\infoScreen(), ilObjForumListGUI\init(), ilLearningProgressGUI\initCollectionManualForm(), ilAccountCodesTableGUI\initFilter(), ilRegistrationCodesTableGUI\initFilter(), ilForumTopicTableGUI\initMergeThreadsTable(), ilRepositoryUserResultTableGUI\initMultiCommands(), ilPCBlogGUI\initPostingForm(), ilPCSection\insertTimings(), ilObjTest\isExecutable(), ilMailFolderTableGUI\isLuceneSearchEnabled(), ilBadgeProfileGUI\listBackpackGroups(), ilBadgeProfileGUI\listBadges(), ilObjGroupAccess\lookupRegistrationInfo(), ilObjCourseAccess\lookupRegistrationInfo(), ilTestPlayerAbstractGUI\outProcessingTime(), ilSCGroupTableGUI\parse(), ilConsultationHourBookingTableGUI\parse(), ilSCTaskTableGUI\parse(), ilGroupParticipantsTableGUI\parse(), ilCourseParticipantsTableGUI\parse(), ilCronManagerTableGUI\parseJobToData(), ilExerciseSubmissionTableGUI\parseRow(), ilRepositoryUserResultTableGUI\parseUserIds(), ilLPTableBaseGUI\parseValue(), ilTrSummaryTableGUI\parseValue(), ilTestServiceGUI\populatePassFinishDate(), ilLinkCheckerTableGUI\prepareHTML(), ilWikiPageGUI\preview(), ilObjGroupGUI\readMemberData(), ilObjCourseGUI\readMemberData(), ilSubscriberTableGUI\readSubscriberData(), ilWaitingListTableGUI\readUserData(), ilObjTestGUI\redirectToInfoScreenObject(), ilCronManagerGUI\render(), ilNewsTimelineItemGUI\render(), ilPortfolioPageGUI\renderBlogTeaser(), ilSessionStatisticsGUI\renderCurrentBasics(), ilObjBlogGUI\renderList(), ilBadgeRenderer\renderModal(), ilPageObjectGUI\rollbackConfirmation(), ilCronDeleteInactiveUserReminderMailNotification\send(), ilTestMailNotification\sendAdvancedNotification(), ilObjExercise\sendAssignment(), ilMembershipCronNotifications\sendMail(), ilTestMailNotification\sendSimpleNotification(), ilObjSurveyGUI\sendUserResultsMail(), arIndexTableGUI\setDateFieldData(), arDisplayGUI\setDateTimeData(), ilSkillSelfEvaluationGUI\setSelfEvaluationPresentationForm(), ilObjUserFolderGUI\showActionConfirmation(), ilLPObjectStatisticsGUI\showAggregationInfo(), ilSCORM2004ScoGUI\showExportList(), ilObjSCORM2004LearningModuleGUI\showExportList(), ilObjTermsOfServiceGUI\showLastResetDate(), ilInfoScreenGUI\showLearningProgress(), ilNewsForContextBlockGUI\showNews(), ilPageObjectGUI\showPage(), ilPersonalProfileGUI\showPublicProfileFields(), ilExSubmissionFileGUI\submissionScreenObject(), ilObjTestGUI\timingOverviewObject(), ilPageObject\update(), ilObjUser\updateLogin(), ilCourseArchivesGUI\view(), ilObjFileAccessSettingsGUI\viewDiskQuotaReport(), and ilObjObjectFolderGUI\viewObject().
|
static |
Format a period of two date Shows: 14.
Jul 2008 18:00 - 20:00 or: Today 18:00 - 20:00 or: 14. Jul 2008 - 16. Jul 2008 or: 14. Jul 2008, 12:00 - 16. Jul 2008, 14:00
public
Definition at line 182 of file class.ilDatePresentation.php.
References $ilUser, ilDateTime\_equals(), ilDateTime\get(), IL_CAL_DATE, IL_CAL_DAY, IL_CAL_FKT_DATE, ilCalendarSettings\TIME_FORMAT_12, and ilCalendarSettings\TIME_FORMAT_24.
Referenced by ilChatroomHistoryGUI\__construct(), ilSessionAppointment\_appointmentToString(), ilObjectActivation\addListGUIActivationProperty(), ilChatroomFormFactory\applyValues(), ilCalendarEntry\appointmentToMailString(), ilObjRemoteCourseGUI\availabilityToString(), ilObjRemoteGroupGUI\availabilityToString(), ilObjRemoteTestGUI\availabilityToString(), ilCalendarAppointmentGUI\book(), ilSessionStatisticsGUI\buildData(), ilCalendarAppointmentGUI\cancelBooking(), ilECSCategoryMappingRule\conditionToString(), ilObjUser\deleteUserDefinedFieldEntries(), ilBookingObjectGUI\displayPostInfo(), ilWikiStatGUI\export(), ilCalendarChangedAppointmentsTableGUI\fillRow(), ilGroupParticipantsTableGUI\fillRow(), ilCourseParticipantsTableGUI\fillRow(), ilCalendarBlockGUI\getData(), ilCalendarAppointmentPanelGUI\getHTML(), ilTrQuery\getSessionData(), ilObjCourseGUI\infoScreen(), ilObjSessionGUI\initAttendanceList(), ilObjBookingPoolGUI\initBookingNumbersForm(), ilObjCourseAccess\lookupPeriodInfo(), ilConsultationHoursTableGUI\parse(), ilAccountMail\replacePlaceholders(), ilObjBookingPoolGUI\rsvConfirmCancelAggregationForm(), ilAccountMail\send(), ilCalendarAppointmentsTableGUI\setAppointments(), ilCalendarAppointmentGUI\showInfoScreen(), and ilMemberExport\write().
|
static |
set language
Definition at line 83 of file class.ilDatePresentation.php.
Referenced by ilMailTemplateContext\resolvePlaceholder().
|
static |
Check if date is "today".
public
object | ilDateTime DateTime object to check |
Definition at line 241 of file class.ilDatePresentation.php.
References $ilUser, ilDateTime\_equals(), IL_CAL_DAY, IL_CAL_UNIX, and time.
|
static |
Check if date is tomorrow.
public
object | ilDateTime DateTime object to check |
Definition at line 281 of file class.ilDatePresentation.php.
References $ilUser, ilDateTime\_equals(), IL_CAL_DAY, IL_CAL_UNIX, ilDateTime\increment(), and time.
|
static |
Check if date is yesterday.
public
object | ilDateTime DateTime object to check |
Definition at line 260 of file class.ilDatePresentation.php.
References $ilUser, ilDateTime\_equals(), IL_CAL_DAY, IL_CAL_UNIX, ilDateTime\increment(), and time.
|
static |
reset to defaults
Definition at line 96 of file class.ilDatePresentation.php.
References $lng.
Referenced by ilObjUser\deleteUserDefinedFieldEntries(), and ilLPProgressTableGUI\fillRowCSV().
|
static |
converts seconds to string: Long: 7 days 4 hour(s) ...
int | $seconds | seconds |
bool | $force_with_seconds | |
ilLanguage | $a_lng |
Definition at line 303 of file class.ilDatePresentation.php.
Referenced by ilLearningProgressBaseGUI\__appendLPDetails(), ilLearningProgressBaseGUI\__appendUserInfo(), ilRegistrationMimeMailNotification\__construct(), ilCourseContentGUI\__renderItem(), ilCourseContentGUI\__renderUserItem(), ilLearningProgressBaseGUI\__showObjectDetails(), ilInfoScreenGUI\addMetaDataSections(), ilCourseContentGUI\editTimings(), ilTimingOverviewTableGUI\fillRow(), ilCalendarAppointmentsTableGUI\fillRow(), ilTrUserObjectsPropsTableGUI\fillRow(), ilCourseMailTemplateTutorContext\getDescription(), ilScormMailTemplateLPContext\getDescription(), ilObjSCORM2004LearningModule\getTrackingDataAgg(), ilObjUserFolderGUI\initFormGeneralSettings(), ilPersonalSettingsGUI\initGeneralSettingsForm(), ilLPTableBaseGUI\parseValue(), ilTrSummaryTableGUI\parseValue(), ilInfoScreenGUI\showLearningProgress(), and ilLearningProgressGUI\showtlt().
|
static |
set language
Definition at line 72 of file class.ilDatePresentation.php.
References $lang.
Referenced by ilForumMailNotification\appendAttachments(), ilObjUser\deleteUserDefinedFieldEntries(), ilMailTemplateContext\resolvePlaceholder(), and ilCronDeleteInactiveUserReminderMailNotification\send().
|
static |
set use relative dates
bool |
Definition at line 50 of file class.ilDatePresentation.php.
Referenced by ilChatroomHistoryGUI\__construct(), ilBookingReservationsTableGUI\__construct(), ilForumMailNotification\appendAttachments(), ilCalendarEntry\appointmentToMailString(), ilSessionStatisticsGUI\buildData(), ilCertificate\createPreview(), ilPersonalSettingsGUI\deleteOwnAccount4(), ilObjUser\deleteUserDefinedFieldEntries(), ilBookingObjectGUI\displayPostInfo(), ilSurveyEvaluationGUI\evaluation(), ilForumExportGUI\executeCommand(), ilSessionStatisticsGUI\exportCSV(), ilSurveyEvaluationGUI\exportEvaluationUser(), ilObjectMetaDataBlockGUI\fillDataSection(), ilLMDownloadTableGUI\fillRow(), ilPollBlockGUI\fillRow(), assFileUploadFileTableGUI\fillRow(), ilQuestionPoolPrintViewTableGUI\fillRow(), ilLPProgressTableGUI\fillRowCSV(), ilTestPassOverviewTableGUI\formatDate(), ilCertificateAdapter\getBaseVariablesForPresentation(), ilCertificateAdapter\getBaseVariablesForPreview(), ilSkillCertificateAdapter\getCertificateVariablesForPresentation(), ilSkillCertificateAdapter\getCertificateVariablesForPreview(), ilBlogExerciseGUI\getExerciseInfo(), ilPortfolioExerciseGUI\getExerciseInfo(), ilLPTableBaseGUI\getExportMeta(), ilAttendanceList\getHTML(), ilTable2GUI\getHTML(), ilObjectMetaDataGUI\getKeyValueList(), ilNoteGUI\getNoteListHTML(), ilCourseMembershipGUI\getPrintMemberData(), ilTestServiceGUI\getResultsSignature(), ilObjSurveyGUI\infoScreen(), ilObjSessionGUI\initAttendanceList(), ilPCSection\insertTimings(), ilBadgeProfileGUI\listBackpackGroups(), ilBadgeProfileGUI\listBadges(), ilCertificate\outCertificate(), ilTestServiceGUI\populatePassFinishDate(), ilBlogPostingGUI\postOutputProcessing(), ilPersonalSkillsGUI\renderObjectEvalRow(), ilPersonalSkillsGUI\renderSelfEvaluationRow(), ilObjBookingPoolGUI\rsvConfirmCancelAggregationForm(), ilMembershipCronNotifications\run(), ilCronDeleteInactiveUserReminderMailNotification\send(), ilTestMailNotification\sendAdvancedNotification(), ilTestMailNotification\sendSimpleNotification(), ilSkillSelfEvaluationGUI\setSelfEvaluationPresentationForm(), ilObjTermsOfServiceGUI\showLastResetDate(), and ilMemberExport\write().
|
static |
check if relative dates are used
Definition at line 61 of file class.ilDatePresentation.php.
Referenced by ilChatroomHistoryGUI\__construct(), ilForumMailNotification\appendAttachments(), ilBookingObjectGUI\displayPostInfo(), ilObjectMetaDataBlockGUI\fillDataSection(), ilPollBlockGUI\fillRow(), ilTestPassOverviewTableGUI\formatDate(), ilCertificateAdapter\getBaseVariablesForPresentation(), ilCertificateAdapter\getBaseVariablesForPreview(), ilSkillCertificateAdapter\getCertificateVariablesForPresentation(), ilSkillCertificateAdapter\getCertificateVariablesForPreview(), ilBlogExerciseGUI\getExerciseInfo(), ilPortfolioExerciseGUI\getExerciseInfo(), ilObjectMetaDataGUI\getKeyValueList(), ilNoteGUI\getNoteListHTML(), ilTestServiceGUI\getResultsSignature(), ilTestServiceGUI\populatePassFinishDate(), ilBlogPostingGUI\postOutputProcessing(), ilMembershipCronNotifications\run(), ilCronDeleteInactiveUserReminderMailNotification\send(), and ilObjTermsOfServiceGUI\showLastResetDate().
|
staticprivate |
Definition at line 38 of file class.ilDatePresentation.php.
|
static |
Definition at line 40 of file class.ilDatePresentation.php.
|
static |
Definition at line 41 of file class.ilDatePresentation.php.
|
static |
Definition at line 37 of file class.ilDatePresentation.php.
|
static |
Definition at line 42 of file class.ilDatePresentation.php.