Skip to content
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

feat(utils): add format_ts #1099

Merged
merged 3 commits into from Sep 19, 2023
Merged

Conversation

teaishealthy
Copy link
Collaborator

Summary

Create a new function format_ts that can format a unix timestamp, format_dt can use this function too to reduce code duplication.

Closes #1085

This is a Code Change

  • I have tested my changes.
  • I have updated the documentation to reflect the changes.
  • I have run task pyright and fixed the relevant issues.

@teaishealthy teaishealthy added t: enhancement Type: enhancement - new feature or request p: low Priority: low - not important to be worked on s: awaiting review Status: the issue or PR is awaiting reviews 2.6 The issue/PR should go for the 2.6 release labels Jul 26, 2023
Copy link
Collaborator

@spifory spifory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And also it's not too important but you may want to add a versionchanged to format_dt.

nextcord/utils.py Show resolved Hide resolved
nextcord/utils.py Outdated Show resolved Hide resolved
nextcord/utils.py Outdated Show resolved Hide resolved
nextcord/utils.py Outdated Show resolved Hide resolved
nextcord/utils.py Show resolved Hide resolved
nextcord/utils.py Show resolved Hide resolved
@teaishealthy
Copy link
Collaborator Author

teaishealthy commented Jul 26, 2023

And also it's not too important but you may want to add a versionchanged to format_dt.

@spifory
The external api for format_dt did not change, no reason to.

Co-authored-by: Luvuyo Khumalo <luvuyosilubane50@gmail.com>
@ooliver1 ooliver1 merged commit 1d6465f into nextcord:master Sep 19, 2023
10 checks passed
@ooliver1 ooliver1 removed the s: awaiting review Status: the issue or PR is awaiting reviews label Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.6 The issue/PR should go for the 2.6 release p: low Priority: low - not important to be worked on t: enhancement Type: enhancement - new feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Let nextcord.utils.format_dt also take a timestamp instead of only datetime
4 participants