Skip to content
Snippets Groups Projects
Commit 044b7b0f authored by Martin Schoeler's avatar Martin Schoeler
Browse files

the right way of checking the date

that does not rely on the language of the app
parent e6541d8f
No related branches found
No related tags found
No related merge requests found
......@@ -196,8 +196,10 @@ Template.message.onViewRendered = (context) ->
else if previousNode?.dataset?
previousDataset = previousNode.dataset
previousMessageDate = new Date(parseInt(previousDataset.timestamp))
currentMessageDate = new Date(parseInt(currentDataset.timestamp))
if previousDataset.date isnt currentDataset.date
if previousMessageDate.toDateString() isnt currentMessageDate.toDateString()
$currentNode.addClass('new-day').removeClass('sequential')
else
$currentNode.removeClass('new-day')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment