[HTML] Render full date in tooltips on unix timestamps

Closes #656
pull/678/head
Tyrrrz 3 years ago
parent 530e2c50a9
commit 38bc259ab6

@ -162,8 +162,11 @@ namespace DiscordChatExporter.Core.Exporting.Writers.MarkdownVisitors
protected override MarkdownNode VisitUnixTimestamp(UnixTimestampNode timestamp)
{
// Timestamp tooltips always use full date regardless of the configured format
var longDateString = timestamp.Value.ToLocalString("dddd, MMMM d, yyyy h:mm tt");
_buffer
.Append("<span class=\"timestamp\">")
.Append($"<span class=\"timestamp\" title=\"{HtmlEncode(longDateString)}\">")
.Append(HtmlEncode(_context.FormatDate(timestamp.Value)))
.Append("</span>");

Loading…
Cancel
Save