Skip to content

Commit 6b9d91d

Browse files
committed
fix: update format to use DayJS format not angular date filter format
1 parent 38c3506 commit 6b9d91d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/filters/humanDate.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ export default (dateStr, hideTime) => {
1313
if (hideTime) {
1414
if (isToday) { result = 'Today' }
1515
else if (isMaxDate) { result = 'Permanent' } // bans
16-
else { result = dayjs(dateStr).format('MMMM d, YYYY') }
16+
else { result = dayjs(dateStr).format('MMMM D, YYYY') }
1717
}
1818
else {
1919
if (timezone) {
20-
if (isToday) { result = 'Today at ' + dayjs(dateStr).format('h:mm a').tz(timezone) }
21-
else if (isThisYear) { result = dayjs(dateStr).format('MMMM d [at] h:mm a').tz(timezone) }
22-
else { result = dayjs(dateStr).format('MMM d, YYYY [at] h:mm a').tz(timezone) }
20+
if (isToday) { result = 'Today at ' + dayjs(dateStr).format('h:mm A').tz(timezone) }
21+
else if (isThisYear) { result = dayjs(dateStr).format('MMMM D [at] h:mm A').tz(timezone) }
22+
else { result = dayjs(dateStr).format('MMM D, YYYY [at] h:mm A').tz(timezone) }
2323
}
2424
else {
25-
if (isToday) { result = 'Today at ' + dayjs(dateStr).format('h:mm a') }
26-
else if (isThisYear) { result = dayjs(dateStr).format('MMMM d [at] h:mm a') }
27-
else { result = dayjs(dateStr).format('MMM d, YYYY [at] h:mm a') }
25+
if (isToday) { result = 'Today at ' + dayjs(dateStr).format('h:mm A') }
26+
else if (isThisYear) { result = dayjs(dateStr).format('MMMM D [at] h:mm A') }
27+
else { result = dayjs(dateStr).format('MMM D, YYYY [at] h:mm A') }
2828
}
2929
}
3030
return result

0 commit comments

Comments
 (0)