@@ -212,7 +212,7 @@
{{ 'addon.mod_assign.gradedby' | translate }}
{{ grader.fullname }}
- {{ feedback.gradeddate * 1000 | coreFormatDate:"dfmediumdate" }}
+ {{ feedback.gradeddate * 1000 | coreFormatDate }}
diff --git a/src/addon/mod/assign/components/submission/submission.ts b/src/addon/mod/assign/components/submission/submission.ts
index b4a66e101..c288f1b22 100644
--- a/src/addon/mod/assign/components/submission/submission.ts
+++ b/src/addon/mod/assign/components/submission/submission.ts
@@ -32,7 +32,6 @@ import { CoreUserProvider } from '@core/user/providers/user';
import { AddonModAssignProvider } from '../../providers/assign';
import { AddonModAssignHelperProvider } from '../../providers/helper';
import { AddonModAssignOfflineProvider } from '../../providers/assign-offline';
-import * as moment from 'moment';
import { CoreTabsComponent } from '@components/tabs/tabs';
import { CoreSplitViewComponent } from '@components/split-view/split-view';
import { AddonModAssignSubmissionPluginComponent } from '../submission-plugin/submission-plugin';
@@ -383,7 +382,7 @@ export class AddonModAssignSubmissionComponent implements OnInit, OnDestroy {
this.assign = assign;
if (assign.allowsubmissionsfromdate && assign.allowsubmissionsfromdate >= time) {
- this.fromDate = moment(assign.allowsubmissionsfromdate * 1000).format(this.translate.instant('core.dfmediumdate'));
+ this.fromDate = this.timeUtils.userDate(assign.allowsubmissionsfromdate * 1000);
}
this.currentAttempt = 0;
diff --git a/src/addon/mod/assign/providers/assign-sync.ts b/src/addon/mod/assign/providers/assign-sync.ts
index 368eba7de..96627a1cc 100644
--- a/src/addon/mod/assign/providers/assign-sync.ts
+++ b/src/addon/mod/assign/providers/assign-sync.ts
@@ -20,6 +20,7 @@ import { CoreLoggerProvider } from '@providers/logger';
import { CoreSitesProvider } from '@providers/sites';
import { CoreSyncProvider } from '@providers/sync';
import { CoreTextUtilsProvider } from '@providers/utils/text';
+import { CoreTimeUtilsProvider } from '@providers/utils/time';
import { CoreUtilsProvider } from '@providers/utils/utils';
import { CoreCourseProvider } from '@core/course/providers/course';
import { CoreGradesHelperProvider } from '@core/grades/providers/helper';
@@ -60,9 +61,10 @@ export class AddonModAssignSyncProvider extends CoreSyncBaseProvider {
private courseProvider: CoreCourseProvider, private eventsProvider: CoreEventsProvider,
private assignProvider: AddonModAssignProvider, private assignOfflineProvider: AddonModAssignOfflineProvider,
private utils: CoreUtilsProvider, private submissionDelegate: AddonModAssignSubmissionDelegate,
- private gradesHelper: CoreGradesHelperProvider) {
+ private gradesHelper: CoreGradesHelperProvider, timeUtils: CoreTimeUtilsProvider) {
- super('AddonModAssignSyncProvider', loggerProvider, sitesProvider, appProvider, syncProvider, textUtils, translate);
+ super('AddonModAssignSyncProvider', loggerProvider, sitesProvider, appProvider, syncProvider, textUtils, translate,
+ timeUtils);
this.componentTranslate = courseProvider.translateModuleName('assign');
}
diff --git a/src/addon/mod/chat/components/index/index.ts b/src/addon/mod/chat/components/index/index.ts
index e21d5623a..34f3bc248 100644
--- a/src/addon/mod/chat/components/index/index.ts
+++ b/src/addon/mod/chat/components/index/index.ts
@@ -17,7 +17,6 @@ import { NavController } from 'ionic-angular';
import { CoreCourseModuleMainActivityComponent } from '@core/course/classes/main-activity-component';
import { CoreTimeUtilsProvider } from '@providers/utils/time';
import { AddonModChatProvider } from '../../providers/chat';
-import * as moment from 'moment';
/**
* Component that displays a chat.
@@ -73,7 +72,7 @@ export class AddonModChatIndexComponent extends CoreCourseModuleMainActivityComp
if (chat.chattime && chat.schedule > 0 && span > 0) {
this.chatInfo = {
- date: moment(chat.chattime * 1000).format('LLL'),
+ date: this.timeUtils.userDate(chat.chattime * 1000),
fromnow: this.timeUtils.formatTime(span)
};
} else {
diff --git a/src/addon/mod/chat/pages/chat/chat.html b/src/addon/mod/chat/pages/chat/chat.html
index 02eb8e71a..47f744618 100644
--- a/src/addon/mod/chat/pages/chat/chat.html
+++ b/src/addon/mod/chat/pages/chat/chat.html
@@ -15,19 +15,19 @@
- {{ message.timestamp * 1000 | coreFormatDate:"dfdayweekmonth" }}
+ {{ message.timestamp * 1000 | coreFormatDate:"strftimedayshort" }}
- {{ message.timestamp * 1000 | coreFormatDate:"dftimedate" }} {{ 'addon.mod_chat.messageenter' | translate:{$a: message.userfullname} }}
+ {{ message.timestamp * 1000 | coreFormatDate:"strftimetime" }} {{ 'addon.mod_chat.messageenter' | translate:{$a: message.userfullname} }}
- {{ message.timestamp * 1000 | coreFormatDate:"dftimedate" }} {{ 'addon.mod_chat.messageexit' | translate:{$a: message.userfullname} }}
+ {{ message.timestamp * 1000 | coreFormatDate:"strftimetime" }} {{ 'addon.mod_chat.messageexit' | translate:{$a: message.userfullname} }}
@@ -40,7 +40,7 @@
-
{{ message.timestamp * 1000 | coreFormatDate:"dftimedate" }}
+ {{ message.timestamp * 1000 | coreFormatDate:"strftimetime" }}
diff --git a/src/addon/mod/choice/components/index/index.ts b/src/addon/mod/choice/components/index/index.ts
index 358a0ac6e..fe583dd04 100644
--- a/src/addon/mod/choice/components/index/index.ts
+++ b/src/addon/mod/choice/components/index/index.ts
@@ -14,11 +14,11 @@
import { Component, Optional, Injector } from '@angular/core';
import { Content } from 'ionic-angular';
+import { CoreTimeUtilsProvider } from '@providers/utils/time';
import { CoreCourseModuleMainActivityComponent } from '@core/course/classes/main-activity-component';
import { AddonModChoiceProvider } from '../../providers/choice';
import { AddonModChoiceOfflineProvider } from '../../providers/offline';
import { AddonModChoiceSyncProvider } from '../../providers/sync';
-import * as moment from 'moment';
/**
* Component that displays a choice.
@@ -50,7 +50,8 @@ export class AddonModChoiceIndexComponent extends CoreCourseModuleMainActivityCo
protected now: number;
constructor(injector: Injector, private choiceProvider: AddonModChoiceProvider, @Optional() content: Content,
- private choiceOffline: AddonModChoiceOfflineProvider, private choiceSync: AddonModChoiceSyncProvider) {
+ private choiceOffline: AddonModChoiceOfflineProvider, private choiceSync: AddonModChoiceSyncProvider,
+ private timeUtils: CoreTimeUtilsProvider) {
super(injector, content);
}
@@ -122,9 +123,9 @@ export class AddonModChoiceIndexComponent extends CoreCourseModuleMainActivityCo
return this.choiceProvider.getChoice(this.courseId, this.module.id).then((choice) => {
this.choice = choice;
this.choice.timeopen = parseInt(choice.timeopen) * 1000;
- this.choice.openTimeReadable = moment(choice.timeopen).format('LLL');
+ this.choice.openTimeReadable = this.timeUtils.userDate(choice.timeopen);
this.choice.timeclose = parseInt(choice.timeclose) * 1000;
- this.choice.closeTimeReadable = moment(choice.timeclose).format('LLL');
+ this.choice.closeTimeReadable = this.timeUtils.userDate(choice.timeclose);
this.description = choice.intro || choice.description;
this.choiceNotOpenYet = choice.timeopen && choice.timeopen > this.now;
diff --git a/src/addon/mod/choice/providers/sync.ts b/src/addon/mod/choice/providers/sync.ts
index 48efe6663..01635c5d4 100644
--- a/src/addon/mod/choice/providers/sync.ts
+++ b/src/addon/mod/choice/providers/sync.ts
@@ -19,6 +19,7 @@ import { CoreSitesProvider } from '@providers/sites';
import { CoreAppProvider } from '@providers/app';
import { CoreUtilsProvider } from '@providers/utils/utils';
import { CoreTextUtilsProvider } from '@providers/utils/text';
+import { CoreTimeUtilsProvider } from '@providers/utils/time';
import { AddonModChoiceOfflineProvider } from './offline';
import { AddonModChoiceProvider } from './choice';
import { CoreEventsProvider } from '@providers/events';
@@ -39,8 +40,10 @@ export class AddonModChoiceSyncProvider extends CoreSyncBaseProvider {
protected appProvider: CoreAppProvider, private choiceOffline: AddonModChoiceOfflineProvider,
private eventsProvider: CoreEventsProvider, private choiceProvider: AddonModChoiceProvider,
translate: TranslateService, private utils: CoreUtilsProvider, protected textUtils: CoreTextUtilsProvider,
- courseProvider: CoreCourseProvider, syncProvider: CoreSyncProvider) {
- super('AddonModChoiceSyncProvider', loggerProvider, sitesProvider, appProvider, syncProvider, textUtils, translate);
+ courseProvider: CoreCourseProvider, syncProvider: CoreSyncProvider, timeUtils: CoreTimeUtilsProvider) {
+ super('AddonModChoiceSyncProvider', loggerProvider, sitesProvider, appProvider, syncProvider, textUtils, translate,
+ timeUtils);
+
this.componentTranslate = courseProvider.translateModuleName('choice');
}
diff --git a/src/addon/mod/data/components/action/addon-mod-data-action.html b/src/addon/mod/data/components/action/addon-mod-data-action.html
index 5645b0c3c..2faa09162 100644
--- a/src/addon/mod/data/components/action/addon-mod-data-action.html
+++ b/src/addon/mod/data/components/action/addon-mod-data-action.html
@@ -24,8 +24,8 @@
-{{ entry.timecreated * 1000 | coreFormatDate:"dffulldate" }}
-{{ entry.timemodified * 1000 | coreFormatDate:"dffulldate" }}
+{{ entry.timecreated * 1000 | coreFormatDate }}
+{{ entry.timemodified * 1000 | coreFormatDate }}
diff --git a/src/addon/mod/data/components/index/index.ts b/src/addon/mod/data/components/index/index.ts
index 71f922666..e67b34d2e 100644
--- a/src/addon/mod/data/components/index/index.ts
+++ b/src/addon/mod/data/components/index/index.ts
@@ -24,7 +24,6 @@ import { AddonModDataHelperProvider } from '../../providers/helper';
import { AddonModDataOfflineProvider } from '../../providers/offline';
import { AddonModDataSyncProvider } from '../../providers/sync';
import { AddonModDataComponentsModule } from '../components.module';
-import * as moment from 'moment';
/**
* Component that displays a data index page.
@@ -186,11 +185,10 @@ export class AddonModDataIndexComponent extends CoreCourseModuleMainActivityComp
this.timeAvailableFrom = this.data.timeavailablefrom && time < this.data.timeavailablefrom ?
parseInt(this.data.timeavailablefrom, 10) * 1000 : false;
- this.timeAvailableFromReadable = this.timeAvailableFrom ?
- moment(this.timeAvailableFrom).format('LLL') : false;
+ this.timeAvailableFromReadable = this.timeAvailableFrom ? this.timeUtils.userDate(this.timeAvailableFrom) : false;
this.timeAvailableTo = this.data.timeavailableto && time > this.data.timeavailableto ?
parseInt(this.data.timeavailableto, 10) * 1000 : false;
- this.timeAvailableToReadable = this.timeAvailableTo ? moment(this.timeAvailableTo).format('LLL') : false;
+ this.timeAvailableToReadable = this.timeAvailableTo ? this.timeUtils.userDate(this.timeAvailableTo) : false;
this.isEmpty = true;
this.groupInfo = null;
diff --git a/src/addon/mod/data/fields/date/component/addon-mod-data-field-date.html b/src/addon/mod/data/fields/date/component/addon-mod-data-field-date.html
index 9d69823cc..674dfb0df 100644
--- a/src/addon/mod/data/fields/date/component/addon-mod-data-field-date.html
+++ b/src/addon/mod/data/fields/date/component/addon-mod-data-field-date.html
@@ -10,5 +10,5 @@
-
+
diff --git a/src/addon/mod/data/providers/sync.ts b/src/addon/mod/data/providers/sync.ts
index 37ac1e714..6e2a90128 100644
--- a/src/addon/mod/data/providers/sync.ts
+++ b/src/addon/mod/data/providers/sync.ts
@@ -19,6 +19,7 @@ import { CoreSyncBaseProvider } from '@classes/base-sync';
import { CoreAppProvider } from '@providers/app';
import { CoreUtilsProvider } from '@providers/utils/utils';
import { CoreTextUtilsProvider } from '@providers/utils/text';
+import { CoreTimeUtilsProvider } from '@providers/utils/time';
import { AddonModDataOfflineProvider } from './offline';
import { AddonModDataProvider } from './data';
import { AddonModDataHelperProvider } from './helper';
@@ -40,9 +41,11 @@ export class AddonModDataSyncProvider extends CoreSyncBaseProvider {
protected appProvider: CoreAppProvider, private dataOffline: AddonModDataOfflineProvider,
private eventsProvider: CoreEventsProvider, private dataProvider: AddonModDataProvider,
protected translate: TranslateService, private utils: CoreUtilsProvider, courseProvider: CoreCourseProvider,
- syncProvider: CoreSyncProvider, protected textUtils: CoreTextUtilsProvider,
+ syncProvider: CoreSyncProvider, protected textUtils: CoreTextUtilsProvider, timeUtils: CoreTimeUtilsProvider,
private dataHelper: AddonModDataHelperProvider) {
- super('AddonModDataSyncProvider', loggerProvider, sitesProvider, appProvider, syncProvider, textUtils, translate);
+ super('AddonModDataSyncProvider', loggerProvider, sitesProvider, appProvider, syncProvider, textUtils, translate,
+ timeUtils);
+
this.componentTranslate = courseProvider.translateModuleName('data');
}
diff --git a/src/addon/mod/feedback/components/index/index.ts b/src/addon/mod/feedback/components/index/index.ts
index 14fbf05c3..1eb116187 100644
--- a/src/addon/mod/feedback/components/index/index.ts
+++ b/src/addon/mod/feedback/components/index/index.ts
@@ -15,12 +15,12 @@
import { Component, Input, Optional, Injector, ViewChild } from '@angular/core';
import { Content, NavController } from 'ionic-angular';
import { CoreGroupInfo, CoreGroupsProvider } from '@providers/groups';
+import { CoreTimeUtilsProvider } from '@providers/utils/time';
import { CoreCourseModuleMainActivityComponent } from '@core/course/classes/main-activity-component';
import { AddonModFeedbackProvider } from '../../providers/feedback';
import { AddonModFeedbackHelperProvider } from '../../providers/helper';
import { AddonModFeedbackOfflineProvider } from '../../providers/offline';
import { AddonModFeedbackSyncProvider } from '../../providers/sync';
-import * as moment from 'moment';
import { CoreTabsComponent } from '@components/tabs/tabs';
/**
@@ -71,7 +71,7 @@ export class AddonModFeedbackIndexComponent extends CoreCourseModuleMainActivity
constructor(injector: Injector, private feedbackProvider: AddonModFeedbackProvider, @Optional() content: Content,
private feedbackOffline: AddonModFeedbackOfflineProvider, private groupsProvider: CoreGroupsProvider,
private feedbackSync: AddonModFeedbackSyncProvider, private navCtrl: NavController,
- private feedbackHelper: AddonModFeedbackHelperProvider) {
+ private feedbackHelper: AddonModFeedbackHelperProvider, private timeUtils: CoreTimeUtilsProvider) {
super(injector, content);
// Listen for form submit events.
@@ -207,11 +207,9 @@ export class AddonModFeedbackIndexComponent extends CoreCourseModuleMainActivity
if (accessData.canedititems) {
this.overview.timeopen = parseInt(this.feedback.timeopen) * 1000 || 0;
- this.overview.openTimeReadable = this.overview.timeopen ?
- moment(this.overview.timeopen).format('LLL') : '';
+ this.overview.openTimeReadable = this.overview.timeopen ? this.timeUtils.userDate(this.overview.timeopen) : '';
this.overview.timeclose = parseInt(this.feedback.timeclose) * 1000 || 0;
- this.overview.closeTimeReadable = this.overview.timeclose ?
- moment(this.overview.timeclose).format('LLL') : '';
+ this.overview.closeTimeReadable = this.overview.timeclose ? this.timeUtils.userDate(this.overview.timeclose) : '';
}
if (accessData.canviewanalysis) {
// Get groups (only for teachers).
diff --git a/src/addon/mod/feedback/pages/attempt/attempt.html b/src/addon/mod/feedback/pages/attempt/attempt.html
index 01ec496c8..e071278a0 100644
--- a/src/addon/mod/feedback/pages/attempt/attempt.html
+++ b/src/addon/mod/feedback/pages/attempt/attempt.html
@@ -9,12 +9,12 @@
{{attempt.fullname}}
- {{attempt.timemodified * 1000 | coreFormatDate:"LLL"}}
+ {{attempt.timemodified * 1000 | coreFormatDate }}
{{ 'addon.mod_feedback.response_nr' |translate }}: {{attempt.number}} ({{ 'addon.mod_feedback.anonymous' |translate }})
- {{attempt.timemodified * 1000 | coreFormatDate:"LLL"}}
+ {{attempt.timemodified * 1000 | coreFormatDate }}
diff --git a/src/addon/mod/feedback/pages/respondents/respondents.html b/src/addon/mod/feedback/pages/respondents/respondents.html
index 115e9a13c..ca7b4a7a7 100644
--- a/src/addon/mod/feedback/pages/respondents/respondents.html
+++ b/src/addon/mod/feedback/pages/respondents/respondents.html
@@ -24,7 +24,7 @@
- {{attempt.timemodified * 1000 | coreFormatDate: "LLL"}}
+ {{attempt.timemodified * 1000 | coreFormatDate }}
diff --git a/src/addon/mod/feedback/providers/helper.ts b/src/addon/mod/feedback/providers/helper.ts
index 87d75b0bb..f0ac01d0c 100644
--- a/src/addon/mod/feedback/providers/helper.ts
+++ b/src/addon/mod/feedback/providers/helper.ts
@@ -17,8 +17,8 @@ import { NavController, ViewController } from 'ionic-angular';
import { AddonModFeedbackProvider } from './feedback';
import { CoreUserProvider } from '@core/user/providers/user';
import { CoreTextUtilsProvider } from '@providers/utils/text';
+import { CoreTimeUtilsProvider } from '@providers/utils/time';
import { TranslateService } from '@ngx-translate/core';
-import * as moment from 'moment';
/**
* Service that provides helper functions for feedbacks.
@@ -31,7 +31,8 @@ export class AddonModFeedbackHelperProvider {
protected MODE_CATEGORY = 3;
constructor(protected feedbackProvider: AddonModFeedbackProvider, protected userProvider: CoreUserProvider,
- protected textUtils: CoreTextUtilsProvider, protected translate: TranslateService) {
+ protected textUtils: CoreTextUtilsProvider, protected translate: TranslateService,
+ protected timeUtils: CoreTimeUtilsProvider) {
}
/**
@@ -278,7 +279,7 @@ export class AddonModFeedbackHelperProvider {
} else if (type == this.MODE_RESPONSETIME) {
item.value = '__CURRENT__TIMESTAMP__';
const tempValue = typeof item.rawValue != 'undefined' ? item.rawValue * 1000 : new Date().getTime();
- item.presentation = moment(tempValue).format('LLL');
+ item.presentation = this.timeUtils.userDate(tempValue);
} else {
// Errors on item, return false.
return false;
diff --git a/src/addon/mod/feedback/providers/sync.ts b/src/addon/mod/feedback/providers/sync.ts
index 21d3b34f8..4aca43570 100644
--- a/src/addon/mod/feedback/providers/sync.ts
+++ b/src/addon/mod/feedback/providers/sync.ts
@@ -19,6 +19,7 @@ import { CoreSyncBaseProvider } from '@classes/base-sync';
import { CoreAppProvider } from '@providers/app';
import { CoreUtilsProvider } from '@providers/utils/utils';
import { CoreTextUtilsProvider } from '@providers/utils/text';
+import { CoreTimeUtilsProvider } from '@providers/utils/time';
import { AddonModFeedbackOfflineProvider } from './offline';
import { AddonModFeedbackProvider } from './feedback';
import { CoreEventsProvider } from '@providers/events';
@@ -39,8 +40,10 @@ export class AddonModFeedbackSyncProvider extends CoreSyncBaseProvider {
protected appProvider: CoreAppProvider, private feedbackOffline: AddonModFeedbackOfflineProvider,
private eventsProvider: CoreEventsProvider, private feedbackProvider: AddonModFeedbackProvider,
protected translate: TranslateService, private utils: CoreUtilsProvider, protected textUtils: CoreTextUtilsProvider,
- courseProvider: CoreCourseProvider, syncProvider: CoreSyncProvider) {
- super('AddonModFeedbackSyncProvider', loggerProvider, sitesProvider, appProvider, syncProvider, textUtils, translate);
+ courseProvider: CoreCourseProvider, syncProvider: CoreSyncProvider, timeUtils: CoreTimeUtilsProvider) {
+ super('AddonModFeedbackSyncProvider', loggerProvider, sitesProvider, appProvider, syncProvider, textUtils, translate,
+ timeUtils);
+
this.componentTranslate = courseProvider.translateModuleName('feedback');
}
diff --git a/src/addon/mod/forum/providers/sync.ts b/src/addon/mod/forum/providers/sync.ts
index 127843475..76fc0c4ae 100644
--- a/src/addon/mod/forum/providers/sync.ts
+++ b/src/addon/mod/forum/providers/sync.ts
@@ -23,6 +23,7 @@ import { CoreEventsProvider } from '@providers/events';
import { CoreSitesProvider } from '@providers/sites';
import { CoreSyncProvider } from '@providers/sync';
import { CoreTextUtilsProvider } from '@providers/utils/text';
+import { CoreTimeUtilsProvider } from '@providers/utils/time';
import { CoreUtilsProvider } from '@providers/utils/utils';
import { AddonModForumProvider } from './forum';
import { AddonModForumHelperProvider } from './helper';
@@ -47,13 +48,15 @@ export class AddonModForumSyncProvider extends CoreSyncBaseProvider {
sitesProvider: CoreSitesProvider,
syncProvider: CoreSyncProvider,
textUtils: CoreTextUtilsProvider,
+ timeUtils: CoreTimeUtilsProvider,
private uploaderProvider: CoreFileUploaderProvider,
private utils: CoreUtilsProvider,
private forumProvider: AddonModForumProvider,
private forumHelper: AddonModForumHelperProvider,
private forumOffline: AddonModForumOfflineProvider) {
- super('AddonModForumSyncProvider', loggerProvider, sitesProvider, appProvider, syncProvider, textUtils, translate);
+ super('AddonModForumSyncProvider', loggerProvider, sitesProvider, appProvider, syncProvider, textUtils, translate,
+ timeUtils);
this.componentTranslate = courseProvider.translateModuleName('forum');
}
diff --git a/src/addon/mod/glossary/providers/sync.ts b/src/addon/mod/glossary/providers/sync.ts
index 00350ef75..ab748ab9d 100644
--- a/src/addon/mod/glossary/providers/sync.ts
+++ b/src/addon/mod/glossary/providers/sync.ts
@@ -23,6 +23,7 @@ import { CoreEventsProvider } from '@providers/events';
import { CoreSitesProvider } from '@providers/sites';
import { CoreSyncProvider } from '@providers/sync';
import { CoreTextUtilsProvider } from '@providers/utils/text';
+import { CoreTimeUtilsProvider } from '@providers/utils/time';
import { CoreUtilsProvider } from '@providers/utils/utils';
import { AddonModGlossaryProvider } from './glossary';
import { AddonModGlossaryHelperProvider } from './helper';
@@ -46,13 +47,15 @@ export class AddonModGlossarySyncProvider extends CoreSyncBaseProvider {
sitesProvider: CoreSitesProvider,
syncProvider: CoreSyncProvider,
textUtils: CoreTextUtilsProvider,
+ timeUtils: CoreTimeUtilsProvider,
private uploaderProvider: CoreFileUploaderProvider,
private utils: CoreUtilsProvider,
private glossaryProvider: AddonModGlossaryProvider,
private glossaryHelper: AddonModGlossaryHelperProvider,
private glossaryOffline: AddonModGlossaryOfflineProvider) {
- super('AddonModGlossarySyncProvider', loggerProvider, sitesProvider, appProvider, syncProvider, textUtils, translate);
+ super('AddonModGlossarySyncProvider', loggerProvider, sitesProvider, appProvider, syncProvider, textUtils, translate,
+ timeUtils);
this.componentTranslate = courseProvider.translateModuleName('glossary');
}
diff --git a/src/addon/mod/lesson/pages/user-retake/user-retake.html b/src/addon/mod/lesson/pages/user-retake/user-retake.html
index 1f28b5e6d..3b35e37e4 100644
--- a/src/addon/mod/lesson/pages/user-retake/user-retake.html
+++ b/src/addon/mod/lesson/pages/user-retake/user-retake.html
@@ -46,7 +46,7 @@
{{ 'addon.mod_lesson.completed' | translate }}
- {{ retake.userstats.completed * 1000 | coreFormatDate:"dfmediumdate" }}
+ {{ retake.userstats.completed * 1000 | coreFormatDate }}
diff --git a/src/addon/mod/lesson/providers/helper.ts b/src/addon/mod/lesson/providers/helper.ts
index 3f7be38d2..e88652f6c 100644
--- a/src/addon/mod/lesson/providers/helper.ts
+++ b/src/addon/mod/lesson/providers/helper.ts
@@ -19,7 +19,6 @@ import { CoreDomUtilsProvider } from '@providers/utils/dom';
import { CoreTextUtilsProvider } from '@providers/utils/text';
import { CoreTimeUtilsProvider } from '@providers/utils/time';
import { AddonModLessonProvider } from './lesson';
-import * as moment from 'moment';
/**
* Helper service that provides some features for quiz.
@@ -430,7 +429,7 @@ export class AddonModLessonHelperProvider {
if (hasGrade) {
data.grade = this.translate.instant('core.percentagenumber', {$a: retake.grade});
}
- data.timestart = moment(retake.timestart * 1000).format('LLL');
+ data.timestart = this.timeUtils.userDate(retake.timestart * 1000);
if (includeDuration) {
data.duration = this.timeUtils.formatTime(retake.timeend - retake.timestart);
}
@@ -438,7 +437,7 @@ export class AddonModLessonHelperProvider {
// The user has not completed the retake.
data.grade = this.translate.instant('addon.mod_lesson.notcompleted');
if (retake.timestart) {
- data.timestart = moment(retake.timestart * 1000).format('LLL');
+ data.timestart = this.timeUtils.userDate(retake.timestart * 1000);
}
}
diff --git a/src/addon/mod/lesson/providers/lesson-sync.ts b/src/addon/mod/lesson/providers/lesson-sync.ts
index 5afb4f829..de7e2ef7c 100644
--- a/src/addon/mod/lesson/providers/lesson-sync.ts
+++ b/src/addon/mod/lesson/providers/lesson-sync.ts
@@ -85,10 +85,11 @@ export class AddonModLessonSyncProvider extends CoreSyncBaseProvider {
syncProvider: CoreSyncProvider, textUtils: CoreTextUtilsProvider, translate: TranslateService,
courseProvider: CoreCourseProvider, private eventsProvider: CoreEventsProvider,
private lessonProvider: AddonModLessonProvider, private lessonOfflineProvider: AddonModLessonOfflineProvider,
- private prefetchHandler: AddonModLessonPrefetchHandler, private timeUtils: CoreTimeUtilsProvider,
+ private prefetchHandler: AddonModLessonPrefetchHandler, timeUtils: CoreTimeUtilsProvider,
private utils: CoreUtilsProvider, private urlUtils: CoreUrlUtilsProvider) {
- super('AddonModLessonSyncProvider', loggerProvider, sitesProvider, appProvider, syncProvider, textUtils, translate);
+ super('AddonModLessonSyncProvider', loggerProvider, sitesProvider, appProvider, syncProvider, textUtils, translate,
+ timeUtils);
this.componentTranslate = courseProvider.translateModuleName('lesson');
diff --git a/src/addon/mod/page/components/index/addon-mod-page-index.html b/src/addon/mod/page/components/index/addon-mod-page-index.html
index 4f99c5dac..3919124c4 100644
--- a/src/addon/mod/page/components/index/addon-mod-page-index.html
+++ b/src/addon/mod/page/components/index/addon-mod-page-index.html
@@ -17,7 +17,7 @@
- {{ 'core.lastmodified' | translate}}: {{ page.timemodified * 1000 | coreFormatDate: "dfmediumdate" }}
+ {{ 'core.lastmodified' | translate}}: {{ page.timemodified * 1000 | coreFormatDate }}
diff --git a/src/addon/mod/quiz/pages/review/review.html b/src/addon/mod/quiz/pages/review/review.html
index 49670516f..f2e4cab77 100644
--- a/src/addon/mod/quiz/pages/review/review.html
+++ b/src/addon/mod/quiz/pages/review/review.html
@@ -24,7 +24,7 @@
{{ 'addon.mod_quiz.startedon' | translate }}
- {{ attempt.timestart * 1000 | coreFormatDate:"dfmediumdate" }}
+ {{ attempt.timestart * 1000 | coreFormatDate }}
{{ 'addon.mod_quiz.attemptstate' | translate }}
@@ -32,7 +32,7 @@
{{ 'addon.mod_quiz.completedon' | translate }}
- {{ attempt.timefinish * 1000 | coreFormatDate:"dfmediumdate" }}
+ {{ attempt.timefinish * 1000 | coreFormatDate }}
{{ 'addon.mod_quiz.timetaken' | translate }}
diff --git a/src/addon/mod/quiz/providers/quiz-sync.ts b/src/addon/mod/quiz/providers/quiz-sync.ts
index 7e25e3891..9c27f22b5 100644
--- a/src/addon/mod/quiz/providers/quiz-sync.ts
+++ b/src/addon/mod/quiz/providers/quiz-sync.ts
@@ -20,6 +20,7 @@ import { CoreLoggerProvider } from '@providers/logger';
import { CoreSitesProvider } from '@providers/sites';
import { CoreSyncProvider } from '@providers/sync';
import { CoreTextUtilsProvider } from '@providers/utils/text';
+import { CoreTimeUtilsProvider } from '@providers/utils/time';
import { CoreCourseProvider } from '@core/course/providers/course';
import { CoreQuestionProvider } from '@core/question/providers/question';
import { CoreQuestionDelegate } from '@core/question/providers/delegate';
@@ -57,12 +58,13 @@ export class AddonModQuizSyncProvider extends CoreSyncBaseProvider {
constructor(loggerProvider: CoreLoggerProvider, sitesProvider: CoreSitesProvider, appProvider: CoreAppProvider,
syncProvider: CoreSyncProvider, textUtils: CoreTextUtilsProvider, translate: TranslateService,
- courseProvider: CoreCourseProvider, private eventsProvider: CoreEventsProvider,
+ courseProvider: CoreCourseProvider, private eventsProvider: CoreEventsProvider, timeUtils: CoreTimeUtilsProvider,
private quizProvider: AddonModQuizProvider, private quizOfflineProvider: AddonModQuizOfflineProvider,
private prefetchHandler: AddonModQuizPrefetchHandler, private questionProvider: CoreQuestionProvider,
private questionDelegate: CoreQuestionDelegate) {
- super('AddonModQuizSyncProvider', loggerProvider, sitesProvider, appProvider, syncProvider, textUtils, translate);
+ super('AddonModQuizSyncProvider', loggerProvider, sitesProvider, appProvider, syncProvider, textUtils, translate,
+ timeUtils);
this.componentTranslate = courseProvider.translateModuleName('quiz');
}
diff --git a/src/addon/mod/quiz/providers/quiz.ts b/src/addon/mod/quiz/providers/quiz.ts
index a14ffedc3..a3c8d87be 100644
--- a/src/addon/mod/quiz/providers/quiz.ts
+++ b/src/addon/mod/quiz/providers/quiz.ts
@@ -26,7 +26,6 @@ import { CoreGradesHelperProvider } from '@core/grades/providers/helper';
import { CoreQuestionDelegate } from '@core/question/providers/delegate';
import { AddonModQuizAccessRuleDelegate } from './access-rules-delegate';
import { AddonModQuizOfflineProvider } from './quiz-offline';
-import * as moment from 'moment';
/**
* Service that provides some features for quiz.
@@ -287,9 +286,9 @@ export class AddonModQuizProvider {
const dueDate = this.getAttemptDueDate(quiz, attempt);
if (attempt.state === AddonModQuizProvider.ATTEMPT_OVERDUE) {
- return this.translate.instant('addon.mod_quiz.overduemustbesubmittedby', {$a: moment(dueDate).format('LLL')});
+ return this.translate.instant('addon.mod_quiz.overduemustbesubmittedby', {$a: this.timeUtils.userDate(dueDate)});
} else if (dueDate) {
- return this.translate.instant('addon.mod_quiz.mustbesubmittedby', {$a: moment(dueDate).format('LLL')});
+ return this.translate.instant('addon.mod_quiz.mustbesubmittedby', {$a: this.timeUtils.userDate(dueDate)});
}
}
@@ -317,7 +316,7 @@ export class AddonModQuizProvider {
if (dueDate) {
sentences.push(this.translate.instant('addon.mod_quiz.stateoverduedetails',
- {$a: moment(dueDate).format('LLL')}));
+ {$a: this.timeUtils.userDate(dueDate)}));
}
return sentences;
@@ -326,7 +325,7 @@ export class AddonModQuizProvider {
return [
this.translate.instant('addon.mod_quiz.statefinished'),
this.translate.instant('addon.mod_quiz.statefinisheddetails',
- {$a: moment(attempt.timefinish * 1000).format('LLL')})
+ {$a: this.timeUtils.userDate(attempt.timefinish * 1000)})
];
case AddonModQuizProvider.ATTEMPT_ABANDONED:
diff --git a/src/addon/mod/resource/providers/module-handler.ts b/src/addon/mod/resource/providers/module-handler.ts
index c29415ad7..94267ed38 100644
--- a/src/addon/mod/resource/providers/module-handler.ts
+++ b/src/addon/mod/resource/providers/module-handler.ts
@@ -22,9 +22,9 @@ import { CoreCourseModuleHandler, CoreCourseModuleHandlerData } from '@core/cour
import { CoreCourseProvider } from '@core/course/providers/course';
import { CoreMimetypeUtilsProvider } from '@providers/utils/mimetype';
import { CoreTextUtilsProvider } from '@providers/utils/text';
+import { CoreTimeUtilsProvider } from '@providers/utils/time';
import { CoreCourseModulePrefetchDelegate } from '@core/course/providers/module-prefetch-delegate';
import { CoreConstants } from '@core/constants';
-import * as moment from 'moment';
/**
* Handler to support resource modules.
@@ -51,7 +51,7 @@ export class AddonModResourceModuleHandler implements CoreCourseModuleHandler {
constructor(protected resourceProvider: AddonModResourceProvider, private courseProvider: CoreCourseProvider,
protected mimetypeUtils: CoreMimetypeUtilsProvider, private resourceHelper: AddonModResourceHelperProvider,
protected prefetchDelegate: CoreCourseModulePrefetchDelegate, protected textUtils: CoreTextUtilsProvider,
- protected translate: TranslateService) {
+ protected translate: TranslateService, protected timeUtils: CoreTimeUtilsProvider) {
}
/**
@@ -185,18 +185,18 @@ export class AddonModResourceModuleHandler implements CoreCourseModuleHandler {
if (options.showdate) {
if (options.filedetails && options.filedetails.modifieddate) {
extra.push(this.translate.instant('addon.mod_resource.modifieddate',
- {$a: moment(options.filedetails.modifieddate * 1000).format('LLL')}));
+ {$a: this.timeUtils.userDate(options.filedetails.modifieddate * 1000, 'core.strftimedatetimeshort') }));
} else if (options.filedetails && options.filedetails.uploadeddate) {
extra.push(this.translate.instant('addon.mod_resource.uploadeddate',
- {$a: moment(options.filedetails.uploadeddate * 1000).format('LLL')}));
+ {$a: this.timeUtils.userDate(options.filedetails.uploadeddate * 1000, 'core.strftimedatetimeshort') }));
} else if (file.timemodified > file.timecreated + CoreConstants.SECONDS_MINUTE * 5) {
/* Modified date may be up to several minutes later than uploaded date just because
teacher did not submit the form promptly. Give teacher up to 5 minutes to do it. */
extra.push(this.translate.instant('addon.mod_resource.modifieddate',
- {$a: moment(file.timemodified * 1000).format('LLL')}));
+ {$a: this.timeUtils.userDate(file.timemodified * 1000, 'core.strftimedatetimeshort') }));
} else {
extra.push(this.translate.instant('addon.mod_resource.uploadeddate',
- {$a: moment(file.timecreated * 1000).format('LLL')}));
+ {$a: this.timeUtils.userDate(file.timecreated * 1000, 'core.strftimedatetimeshort') }));
}
}
}
diff --git a/src/addon/mod/scorm/providers/scorm-sync.ts b/src/addon/mod/scorm/providers/scorm-sync.ts
index ae6281365..9a5d06ae7 100644
--- a/src/addon/mod/scorm/providers/scorm-sync.ts
+++ b/src/addon/mod/scorm/providers/scorm-sync.ts
@@ -20,6 +20,7 @@ import { CoreLoggerProvider } from '@providers/logger';
import { CoreSitesProvider } from '@providers/sites';
import { CoreSyncProvider } from '@providers/sync';
import { CoreTextUtilsProvider } from '@providers/utils/text';
+import { CoreTimeUtilsProvider } from '@providers/utils/time';
import { CoreUtilsProvider } from '@providers/utils/utils';
import { CoreCourseProvider } from '@core/course/providers/course';
import { CoreSyncBaseProvider } from '@classes/base-sync';
@@ -62,11 +63,12 @@ export class AddonModScormSyncProvider extends CoreSyncBaseProvider {
constructor(loggerProvider: CoreLoggerProvider, sitesProvider: CoreSitesProvider, appProvider: CoreAppProvider,
syncProvider: CoreSyncProvider, textUtils: CoreTextUtilsProvider, translate: TranslateService,
- courseProvider: CoreCourseProvider, private eventsProvider: CoreEventsProvider,
+ courseProvider: CoreCourseProvider, private eventsProvider: CoreEventsProvider, timeUtils: CoreTimeUtilsProvider,
private scormProvider: AddonModScormProvider, private scormOfflineProvider: AddonModScormOfflineProvider,
private prefetchHandler: AddonModScormPrefetchHandler, private utils: CoreUtilsProvider) {
- super('AddonModScormSyncProvider', loggerProvider, sitesProvider, appProvider, syncProvider, textUtils, translate);
+ super('AddonModScormSyncProvider', loggerProvider, sitesProvider, appProvider, syncProvider, textUtils, translate,
+ timeUtils);
this.componentTranslate = courseProvider.translateModuleName('scorm');
}
diff --git a/src/addon/mod/survey/providers/sync.ts b/src/addon/mod/survey/providers/sync.ts
index ac3601d15..084e05eec 100644
--- a/src/addon/mod/survey/providers/sync.ts
+++ b/src/addon/mod/survey/providers/sync.ts
@@ -19,6 +19,7 @@ import { CoreSyncBaseProvider } from '@classes/base-sync';
import { CoreAppProvider } from '@providers/app';
import { CoreUtilsProvider } from '@providers/utils/utils';
import { CoreTextUtilsProvider } from '@providers/utils/text';
+import { CoreTimeUtilsProvider } from '@providers/utils/time';
import { AddonModSurveyOfflineProvider } from './offline';
import { AddonModSurveyProvider } from './survey';
import { CoreEventsProvider } from '@providers/events';
@@ -39,9 +40,10 @@ export class AddonModSurveySyncProvider extends CoreSyncBaseProvider {
syncProvider: CoreSyncProvider, textUtils: CoreTextUtilsProvider, translate: TranslateService,
courseProvider: CoreCourseProvider, private surveyOffline: AddonModSurveyOfflineProvider,
private eventsProvider: CoreEventsProvider, private surveyProvider: AddonModSurveyProvider,
- private utils: CoreUtilsProvider) {
+ private utils: CoreUtilsProvider, timeUtils: CoreTimeUtilsProvider) {
- super('AddonModSurveySyncProvider', loggerProvider, sitesProvider, appProvider, syncProvider, textUtils, translate);
+ super('AddonModSurveySyncProvider', loggerProvider, sitesProvider, appProvider, syncProvider, textUtils, translate,
+ timeUtils);
this.componentTranslate = courseProvider.translateModuleName('survey');
}
diff --git a/src/addon/mod/wiki/providers/wiki-sync.ts b/src/addon/mod/wiki/providers/wiki-sync.ts
index a042a04c9..5a2bdc441 100644
--- a/src/addon/mod/wiki/providers/wiki-sync.ts
+++ b/src/addon/mod/wiki/providers/wiki-sync.ts
@@ -21,6 +21,7 @@ import { CoreLoggerProvider } from '@providers/logger';
import { CoreSitesProvider } from '@providers/sites';
import { CoreSyncProvider } from '@providers/sync';
import { CoreTextUtilsProvider } from '@providers/utils/text';
+import { CoreTimeUtilsProvider } from '@providers/utils/time';
import { CoreUtilsProvider } from '@providers/utils/utils';
import { CoreCourseProvider } from '@core/course/providers/course';
import { CoreSyncBaseProvider } from '@classes/base-sync';
@@ -103,9 +104,10 @@ export class AddonModWikiSyncProvider extends CoreSyncBaseProvider {
syncProvider: CoreSyncProvider, textUtils: CoreTextUtilsProvider, translate: TranslateService,
courseProvider: CoreCourseProvider, private eventsProvider: CoreEventsProvider,
private wikiProvider: AddonModWikiProvider, private wikiOfflineProvider: AddonModWikiOfflineProvider,
- private utils: CoreUtilsProvider, private groupsProvider: CoreGroupsProvider) {
+ private utils: CoreUtilsProvider, private groupsProvider: CoreGroupsProvider, timeUtils: CoreTimeUtilsProvider) {
- super('AddonModWikiSyncProvider', loggerProvider, sitesProvider, appProvider, syncProvider, textUtils, translate);
+ super('AddonModWikiSyncProvider', loggerProvider, sitesProvider, appProvider, syncProvider, textUtils, translate,
+ timeUtils);
this.componentTranslate = courseProvider.translateModuleName('wiki');
}
diff --git a/src/addon/mod/workshop/providers/sync.ts b/src/addon/mod/workshop/providers/sync.ts
index e0f37b92c..f6693960f 100644
--- a/src/addon/mod/workshop/providers/sync.ts
+++ b/src/addon/mod/workshop/providers/sync.ts
@@ -22,6 +22,7 @@ import { CoreEventsProvider } from '@providers/events';
import { CoreSitesProvider } from '@providers/sites';
import { CoreSyncProvider } from '@providers/sync';
import { CoreTextUtilsProvider } from '@providers/utils/text';
+import { CoreTimeUtilsProvider } from '@providers/utils/time';
import { CoreUtilsProvider } from '@providers/utils/utils';
import { AddonModWorkshopProvider } from './workshop';
import { AddonModWorkshopHelperProvider } from './helper';
@@ -46,12 +47,14 @@ export class AddonModWorkshopSyncProvider extends CoreSyncBaseProvider {
sitesProvider: CoreSitesProvider,
syncProvider: CoreSyncProvider,
textUtils: CoreTextUtilsProvider,
+ timeUtils: CoreTimeUtilsProvider,
private utils: CoreUtilsProvider,
private workshopProvider: AddonModWorkshopProvider,
private workshopHelper: AddonModWorkshopHelperProvider,
private workshopOffline: AddonModWorkshopOfflineProvider) {
- super('AddonModWorkshopSyncProvider', loggerProvider, sitesProvider, appProvider, syncProvider, textUtils, translate);
+ super('AddonModWorkshopSyncProvider', loggerProvider, sitesProvider, appProvider, syncProvider, textUtils, translate,
+ timeUtils);
this.componentTranslate = courseProvider.translateModuleName('workshop');
}
diff --git a/src/addon/notes/providers/notes-sync.ts b/src/addon/notes/providers/notes-sync.ts
index 059d61530..e02baf438 100644
--- a/src/addon/notes/providers/notes-sync.ts
+++ b/src/addon/notes/providers/notes-sync.ts
@@ -22,6 +22,7 @@ import { AddonNotesProvider } from './notes';
import { CoreCoursesProvider } from '@core/courses/providers/courses';
import { CoreEventsProvider } from '@providers/events';
import { CoreTextUtilsProvider } from '@providers/utils/text';
+import { CoreTimeUtilsProvider } from '@providers/utils/time';
import { CoreUtilsProvider } from '@providers/utils/utils';
import { TranslateService } from '@ngx-translate/core';
import { CoreSyncProvider } from '@providers/sync';
@@ -38,9 +39,9 @@ export class AddonNotesSyncProvider extends CoreSyncBaseProvider {
syncProvider: CoreSyncProvider, textUtils: CoreTextUtilsProvider, translate: TranslateService,
private notesOffline: AddonNotesOfflineProvider, private utils: CoreUtilsProvider,
private eventsProvider: CoreEventsProvider, private notesProvider: AddonNotesProvider,
- private coursesProvider: CoreCoursesProvider) {
+ private coursesProvider: CoreCoursesProvider, timeUtils: CoreTimeUtilsProvider) {
- super('AddonNotesSync', loggerProvider, sitesProvider, appProvider, syncProvider, textUtils, translate);
+ super('AddonNotesSync', loggerProvider, sitesProvider, appProvider, syncProvider, textUtils, translate, timeUtils);
}
/**
diff --git a/src/addon/userprofilefield/datetime/component/addon-user-profile-field-datetime.html b/src/addon/userprofilefield/datetime/component/addon-user-profile-field-datetime.html
index 34423ce92..a3d9a57f2 100644
--- a/src/addon/userprofilefield/datetime/component/addon-user-profile-field-datetime.html
+++ b/src/addon/userprofilefield/datetime/component/addon-user-profile-field-datetime.html
@@ -1,7 +1,7 @@
{{ field.name }}
- {{ field.value * 1000 | coreFormatDate:"dfmediumdate"}}
+ {{ field.value * 1000 | coreFormatDate }}
diff --git a/src/assets/lang/en.json b/src/assets/lang/en.json
index fe2a2cea1..2b26aa66c 100644
--- a/src/assets/lang/en.json
+++ b/src/assets/lang/en.json
@@ -1655,6 +1655,21 @@
"core.sorry": "Sorry...",
"core.sortby": "Sort by",
"core.start": "Start",
+ "core.strftimedate": "%d %B %Y",
+ "core.strftimedatefullshort": "%d/%m/%y",
+ "core.strftimedateshort": "%d %B",
+ "core.strftimedatetime": "%d %B %Y, %I:%M %p",
+ "core.strftimedatetimeshort": "%d/%m/%y, %H:%M",
+ "core.strftimedaydate": "%A, %d %B %Y",
+ "core.strftimedaydatetime": "%A, %d %B %Y, %I:%M %p",
+ "core.strftimedayshort": "%A, %d %B",
+ "core.strftimedaytime": "%a, %H:%M",
+ "core.strftimemonthyear": "%B %Y",
+ "core.strftimerecent": "%d %b, %H:%M",
+ "core.strftimerecentfull": "%a, %d %b %Y, %I:%M %p",
+ "core.strftimetime": "%I:%M %p",
+ "core.strftimetime12": "%I:%M %p",
+ "core.strftimetime24": "%H:%M",
"core.submit": "Submit",
"core.success": "Success",
"core.tablet": "Tablet",
diff --git a/src/classes/base-sync.ts b/src/classes/base-sync.ts
index d9fc0d477..2d1106973 100644
--- a/src/classes/base-sync.ts
+++ b/src/classes/base-sync.ts
@@ -18,7 +18,7 @@ import { CoreSyncProvider } from '@providers/sync';
import { CoreLoggerProvider } from '@providers/logger';
import { CoreAppProvider } from '@providers/app';
import { CoreTextUtilsProvider } from '@providers/utils/text';
-import * as moment from 'moment';
+import { CoreTimeUtilsProvider } from '@providers/utils/time';
/**
* Base class to create sync providers. It provides some common functions.
@@ -51,7 +51,8 @@ export class CoreSyncBaseProvider {
constructor(component: string, loggerProvider: CoreLoggerProvider, protected sitesProvider: CoreSitesProvider,
protected appProvider: CoreAppProvider, protected syncProvider: CoreSyncProvider,
- protected textUtils: CoreTextUtilsProvider, protected translate: TranslateService) {
+ protected textUtils: CoreTextUtilsProvider, protected translate: TranslateService,
+ protected timeUtils: CoreTimeUtilsProvider) {
this.logger = loggerProvider.getInstance(component);
this.component = component;
@@ -122,7 +123,7 @@ export class CoreSyncBaseProvider {
if (!timestamp) {
return this.translate.instant('core.never');
} else {
- return moment(timestamp).format('LLL');
+ return this.timeUtils.userDate(timestamp);
}
}
diff --git a/src/components/file/core-file.html b/src/components/file/core-file.html
index b8d89f5a2..1ae020dfa 100644
--- a/src/components/file/core-file.html
+++ b/src/components/file/core-file.html
@@ -2,7 +2,7 @@
{{fileName}}
{{ fileSizeReadable }}
- {{ timemodified * 1000 | coreFormatDate:"dfmediumdate" }}
+ {{ timemodified * 1000 | coreFormatDate }}