a simple go date formatter and parser, based on conventions of Microsoft Excel (TM)
package main
import (
"github.com/metakeule/fmtdate"
"fmt"
)
func main() {
date := fmtdate.Format("DD.MM.YYYY", time.Now())
fmt.Println(date)
var err
date, err = fmtdate.Parse("M/D/YY", "2/3/07")
fmt.Println(date, err)
}
hh - hours
mm - minutes
ss - seconds
M - month (1)
MM - month (01)
MMM - month (Jan)
MMMM - month (January)
D - day (2)
DD - day (02)
DDD - day (Mon)
DDDD - day (Monday)
YY - year (06)
YYYY - year (2006)