It could be achieved by editing the defaultRelativeTime
variable in the moment.js
file from this:
var defaultRelativeTime = {
future : 'in %s',
past : '%s ago',
s : 'a few seconds',
m : 'a minute',
mm : '%d minutes',
h : 'an hour',
hh : '%d hours',
d : 'a day',
dd : '%d days',
M : 'a month',
MM : '%d months',
y : 'a year',
yy : '%d years'
};
To this:
var defaultRelativeTime = {
future : 'in %s',
past : '%s ago',
s : 'a few seconds',
m : '1m',
mm : '%dm',
h : '1h',
hh : '%dh',
d : '1D',
dd : '%dD',
M : '1M',
MM : '%dM',
y : '1Y',
yy : '%dY'
};
But is there any other way in which it could be done WITHOUT modifying the moment.js
file?