We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c85deea commit 761f0eeCopy full SHA for 761f0ee
src/composables/filters/humanDate.js
@@ -1,6 +1,6 @@
1
import * as dayjs from 'dayjs'
2
3
-export default (dateStr, hideTime) => {
+export default (dateStr, hideTime, customFormat) => {
4
//let timezone = PreferencesSvc.preferences.timezone_offset || ''
5
let timezone
6
let result
@@ -15,6 +15,7 @@ export default (dateStr, hideTime) => {
15
else if (isMaxDate) { result = 'Permanent' } // bans
16
else { result = dayjs(dateStr).format('MMM D, YYYY') }
17
}
18
+ else if (customFormat) result = dayjs(dateStr).format(customFormat)
19
else {
20
if (timezone) {
21
if (isToday) { result = 'Today at ' + dayjs(dateStr).format('h:mm A').tz(timezone) }
0 commit comments