forked from date-fns/date-fns
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1 parent
062c07a
commit 56adab6
Showing
10 changed files
with
918 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
"ca", | ||
"cs", | ||
"da", | ||
"el", | ||
"fi", | ||
"fil", | ||
"fr-CH", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,39 @@ | ||
import buildFormatLongFn from '../../../_lib/buildFormatLongFn/index.js' | ||
|
||
var formatLong = buildFormatLongFn({ | ||
LT: 'h:mm aa', | ||
LTS: 'h:mm:ss aa', | ||
L: 'MM/DD/YYYY', | ||
LL: 'MMMM D YYYY', | ||
LLL: 'MMMM D YYYY h:mm aa', | ||
LLLL: 'dddd, MMMM D YYYY h:mm aa' | ||
}) | ||
var dateFormats = { | ||
full: 'EEEE, d MMMM y', | ||
long: 'd MMMM y', | ||
medium: 'd MMM y', | ||
short: 'd/M/yy' | ||
} | ||
|
||
var timeFormats = { | ||
full: 'h:mm:ss a zzzz', | ||
long: 'h:mm:ss a z', | ||
medium: 'h:mm:ss a', | ||
short: 'h:mm a' | ||
} | ||
|
||
var dateTimeFormats = { | ||
full: '{{date}} - {{time}}', | ||
long: '{{date}} - {{time}}', | ||
medium: '{{date}}, {{time}}', | ||
short: '{{date}}, {{time}}' | ||
} | ||
|
||
var formatLong = { | ||
date: buildFormatLongFn({ | ||
formats: dateFormats, | ||
defaultWidth: 'full' | ||
}), | ||
time: buildFormatLongFn({ | ||
formats: timeFormats, | ||
defaultWidth: 'full' | ||
}), | ||
dateTime: buildFormatLongFn({ | ||
formats: dateTimeFormats, | ||
defaultWidth: 'full' | ||
}) | ||
} | ||
|
||
export default formatLong |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
var formatRelativeLocale = { | ||
lastWeek: '[last] dddd [at] LT', | ||
yesterday: '[yesterday at] LT', | ||
today: '[today at] LT', | ||
tomorrow: '[tomorrow at] LT', | ||
nextWeek: 'dddd [at] LT', | ||
other: 'L' | ||
lastWeek: "'την προηγούμενη' eeee 'στις' p", | ||
yesterday: "'χθες στις' p", | ||
today: "'σήμερα στις' p", | ||
tomorrow: "'αύριο στις' p", | ||
nextWeek: "eeee 'στις' p", | ||
other: 'P' | ||
} | ||
|
||
export default function formatRelative (token, date, baseDate, options) { | ||
export default function formatRelative(token, date, baseDate, options) { | ||
return formatRelativeLocale[token] | ||
} |
Oops, something went wrong.