Exercism: Go version of the 'Gigasecond' exercise.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
196 B

6 years ago
  1. package gigasecond
  2. import "time"
  3. const testVersion = 4
  4. // AddGigasecond adds 1 billion seconds to the initial time
  5. func AddGigasecond(t time.Time) time.Time {
  6. return t.Add(1e9 * time.Second)
  7. }