Added 'years ago' to memories
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
parent
649e4d0964
commit
5d9d169310
@ -738,7 +738,13 @@
|
||||
header.classList.add("horizontal");
|
||||
var div = document.createElement("div");
|
||||
div.classList.add("date");
|
||||
div.textContent = window.moment(datetime, "YYYY-MM-DD").calendar(null, { sameElse: "MMM DD, YYYY" }).replace(/ at.*/, "");
|
||||
if (this.mode == "memories") {
|
||||
var ago = window.moment(datetime, "YYYY-MM-DD").fromNow();
|
||||
ago = ago.charAt(0).toUpperCase() + ago.substr(1);
|
||||
div.innerHTML = "<b>" + ago + "</b><br><span style='font-size: 0.8em;font-weight: normal'>" + window.moment(datetime, "YYYY-MM-DD").calendar(null, { sameElse: "MMM DD, YYYY" }).replace(/ at.*/, "") + "</span>";
|
||||
} else {
|
||||
div.textContent = window.moment(datetime, "YYYY-MM-DD").calendar(null, { sameElse: "MMM DD, YYYY" }).replace(/ at.*/, "");
|
||||
}
|
||||
Polymer.dom(dateBlock).appendChild(header);
|
||||
Polymer.dom(header).appendChild(div);
|
||||
thumbnails = document.createElement("div");
|
||||
|
Loading…
x
Reference in New Issue
Block a user