Documentation
¶
Index ¶
Constants ¶
View Source
const DATE_FORMAT string = time.RFC3339
Variables ¶
View Source
var DateArgvAction = func(c commander.Context) error { date, ok := c.GetString("<date>") if !ok || len(date) == 0 { return errors.New("ERROR: <date> should not be empty.") } offset, err := formatDate(date) if err != nil { return err } if c.Contain("--day") || c.Contain("--month") || c.Contain("--year") { offset = offset.AddDate(c.MustInt("--year"), c.MustInt("--month"), c.MustInt("--day")) } if i := c.MustInt("--hour"); i != 0 { offset = offset.Add(time.Duration(i) * time.Hour) } if i := c.MustInt("--minute"); i != 0 { offset = offset.Add(time.Duration(i) * time.Minute) } if offset.Equal(time.Now()) { return nil } return execCommandGitDate(offset.Unix()) }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.