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

Changed verify.go to accept both slash and interaction based verification #7

Merged
merged 3 commits into from
Feb 16, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added utility to return current day, month, year as integer values
JustIceO7 committed Oct 2, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit aeb5f9b637751382f9a4d87a52ca8c96dc1667ea
18 changes: 18 additions & 0 deletions pkg/utils/time.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package utils

import (
"time"
)

// GetTime looks at current time and returns day, month, year as Integers
func GetTime() (int, int, int) {
currentTime := time.Now()

parsedTime, _ := time.Parse("02-01-2006", currentTime.Format("02-01-2006"))
Copy link

Choose a reason for hiding this comment

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

Also can pull the format from a viper config in future.


day := parsedTime.Day()
month := int(parsedTime.Month())
year := parsedTime.Year()

return day, month, year
}