-
-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add TimeStamp support. #940
Add TimeStamp support. #940
Conversation
Shouldn't there be support for all the flags? |
Technically speaking, yes, but:
|
Doesn't really make sense to restrict it to only the relative one. Nothing wrong with an enum either |
@idoeverything done. |
DSharpPlus/Enums/TimestampFormat.cs
Outdated
/// <summary> | ||
/// Denotes the type of formatting to use for timestamps. | ||
/// </summary> | ||
public enum TimestampFormat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
: char
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DSharpPlus/Formatter.cs
Outdated
/// <param name="time">The time from now.</param> | ||
/// <param name="format">The format to render the timestamp in. Defaults to relative.</param> | ||
/// <returns>A formatted timestamp relative to now.</returns> | ||
public static string TimeStamp(TimeSpan time, TimestampFormat format = TimestampFormat.RelativeTime) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/S/s/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, sed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, also I forgot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what I forgot
@Emzi0767 should be good now |
Summary
Adds support for timestamps, documented in discord/discord-api-docs#3135.