blob: 6a1d8fe78386e97f0e0d7eb5d977dc52ceed6123 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
var formatRelativeLocale = {
lastWeek: function(date) {
switch (date.getUTCDay()) {
case 6: //Σάββατο
return "'το προηγούμενο' eeee 'στις' p"
default:
return "'την προηγούμενη' eeee 'στις' p"
}
},
yesterday: "'χθες στις' p",
today: "'σήμερα στις' p",
tomorrow: "'αύριο στις' p",
nextWeek: "eeee 'στις' p",
other: 'P'
}
export default function formatRelative(token, date, baseDate, options) {
var format = formatRelativeLocale[token]
if (typeof format === 'function') return format(date, baseDate, options)
return format
}
|