account-statement #126

Merged
lash merged 14 commits from account-statement into master 2024-11-22 19:24:08 +01:00
Showing only changes of commit 9498242901 - Show all commits

View File

@ -110,7 +110,6 @@ func GetTransferData(ctx context.Context, db storage.PrefixDb, publicKey string,
// Helper function to format date in desired output
func formatDate(dateStr string) string {
fmt.Println(dateStr)
parsedDate, err := time.Parse("2006-01-02 15:04:05 -0700 MST", dateStr)
Review

this is hardcoded..?

this is hardcoded..?
Review

Yes it is. This defines the layout that will be used to parse the dateStr

func time.Parse(layout string, value string)

Yes it is. This defines the layout that will be used to parse the dateStr func time.Parse(layout string, value string)
if err != nil {
fmt.Println("Error parsing date:", err)