mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2025-12-13 19:55:21 +00:00
Comments
This commit is contained in:
12
utils/formatDate.go
Normal file
12
utils/formatDate.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package utils
|
||||
|
||||
import "time"
|
||||
|
||||
func FormatDate(date string) (string, error) {
|
||||
time, err := time.Parse("2006-01-02T15:04:05Z", date)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return time.Format("Jan 2, 2006 3:04 PM"), nil
|
||||
}
|
||||
Reference in New Issue
Block a user