mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-21 07:50:37 +01:00
feat: closes #12123, allow setting hh:mm for pin expiry
use locale for pin expiry and use short form
This commit is contained in:
@@ -343,8 +343,11 @@ module.exports = function (utils, Benchpress, relative_path) {
|
||||
return `[[topic:wrote-${langSuffix}, ${relative_path}/post/${post.pid}, ${post.timestampISO}]]`;
|
||||
}
|
||||
|
||||
function isoTimeToLocaleString(isoTime) {
|
||||
return new Date(isoTime).toLocaleString().replace(/,/g, ',');
|
||||
function isoTimeToLocaleString(isoTime, locale = 'en-GB') {
|
||||
return new Date(isoTime).toLocaleString([locale], {
|
||||
dateStyle: 'short',
|
||||
timeStyle: 'short',
|
||||
}).replace(/,/g, ',');
|
||||
}
|
||||
|
||||
function shouldHideReplyContainer(post) {
|
||||
|
||||
Reference in New Issue
Block a user