Improved l10n for time format

#490
This commit is contained in:
Igor Zhukov 2014-09-29 21:47:19 +04:00
parent 315cafa654
commit 14be9c8b41

View File

@ -63,7 +63,7 @@ angular.module('myApp.filters', ['myApp.i18n'])
var ticks = timestamp * 1000,
diff = Math.abs(tsNow() - ticks),
format = 'HH:mm';
format = 'shortTime';
if (diff > 518400000) { // 6 days
format = 'shortDate';
@ -78,7 +78,7 @@ angular.module('myApp.filters', ['myApp.i18n'])
.filter('time', ['$filter', function($filter) {
var cachedDates = {},
dateFilter = $filter('date'),
format = Config.Mobile ? 'HH:mm' : 'HH:mm:ss';
format = Config.Mobile ? 'shortTime' : 'mediumTime';
return function (timestamp) {
if (cachedDates[timestamp]) {