From 964fa4ed84991207b5e1581a503e296c577ac160 Mon Sep 17 00:00:00 2001 From: Rozen Date: Wed, 14 Sep 2022 23:22:47 +0200 Subject: [PATCH] Im so sad v2 --- .../Entities/Messages/TimestampTag.cs | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/Discord.Net.Core/Entities/Messages/TimestampTag.cs b/src/Discord.Net.Core/Entities/Messages/TimestampTag.cs index 9b4f624f9..a8153ad63 100644 --- a/src/Discord.Net.Core/Entities/Messages/TimestampTag.cs +++ b/src/Discord.Net.Core/Entities/Messages/TimestampTag.cs @@ -20,8 +20,8 @@ namespace Discord /// /// Creates a new from the provided time. /// - /// The time for this tag. - /// The style for this tag. + /// The time for this timestamp tag. + /// The style for this timestamp tag. public TimestampTag(DateTimeOffset time, TimestampTagStyles? style = null) { Time = time; @@ -69,5 +69,23 @@ namespace Discord /// The newly create timestamp tag. public static TimestampTag FromDateTimeOffset(DateTimeOffset time, TimestampTagStyles? style = null) => new(time, style); + + /// + /// Immediately formats the provided time and style into a timestamp string. + /// + /// The time of this timestamp tag. + /// The style for this timestamp tag. + /// The newly create timestamp string. + public static string FormatFromDateTime(DateTime time, TimestampTagStyles style) + => FormatFromDateTimeOffset(time, style); + + /// + /// Immediately formats the provided time and style into a timestamp string. + /// + /// The time of this timestamp tag. + /// The style for this timestamp tag. + /// The newly create timestamp string. + public static string FormatFromDateTimeOffset(DateTimeOffset time, TimestampTagStyles style) + => $""; } }