UX: adds title attribute with end/start time on topic title

UX: adds title attribute with end/start time on topic title

diff --git a/assets/javascripts/initializers/decorate-topic-title.js.es6 b/assets/javascripts/initializers/decorate-topic-title.js.es6
index b450647..8fcaf4b 100644
--- a/assets/javascripts/initializers/decorate-topic-title.js.es6
+++ b/assets/javascripts/initializers/decorate-topic-title.js.es6
@@ -1,3 +1,4 @@
+import I18n from "I18n";
 import { withPluginApi } from "discourse/lib/plugin-api";
 import guessDateFormat from "discourse/plugins/discourse-calendar/lib/guess-best-date-format";
 
@@ -13,12 +14,26 @@ function initializeDecorateTopicTitle(api) {
           return;
         }
 
+        const formattedDate = date
+          .tz(moment.tz.guess())
+          .format(guessDateFormat(date));
+        if (moment().isBefore(date)) {
+          node.title = I18n.t("discourse_post_event.topic_title.starts_at", {
+            date: formattedDate,
+          });
+        } else {
+          node.title = I18n.t("discourse_post_event.topic_title.ended_at", {
+            date: formattedDate,
+          });
+        }
+
         const eventdateContainer = document.createElement("div");
         eventdateContainer.classList.add("event-date-container");
 
         const eventDate = document.createElement("span");
         eventDate.classList.add("event-date", "relative-future-date");
         eventDate.dataset.time = date.tz(moment.tz.guess()).valueOf();
+
         eventDate.innerText = date.tz(moment.tz.guess()).from(moment());
 
         eventdateContainer.appendChild(eventDate);
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index daa4048..b2da0bc 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -280,6 +280,9 @@ en:
       preview:
         more_than_one_event: You can’t have more than one event.
       edit_reason: Event updated
+      topic_title:
+        starts_at: Event will start at %{date}
+        ended_at: Event ended at %{date}
       models:
         invitee:
           status:

GitHub sha: 0526d309