package tree import ( "time" ) // TODO; let the user choose the date format func MakeDatestamp(t time.Time) string { /* // Get system locale from the environment locale := os.Getenv("LANG") if locale == "" { locale = "en_US" // Default to English (US) if not set } // Parse the language tag tag, err := language.Parse(locale) if err != nil { log.Fatalf("Invalid locale: %v", err) } // Create a date formatter formatter := date.NewFormatter(date.OrderDefault, catalog.NewBuilder()) // Get the current timestamp now := time.Now() // Format the date based on the locale p := message.NewPrinter(tag) formattedDate := formatter.Format(tag, now) // Print the formatted date fmt.Println("Formatted Date:", formattedDate) // Alternative: Use predefined time formats fmt.Println("Localized Date (fallback):", p.Sprintf("%v", now.Format(time.RFC1123))) */ return t.Format(time.RFC1123) }