Sha256: 5deda3f182016c09fdeeddecd7dddd1eae5041274d5e001b54526621765878d0
Contents?: true
Size: 308 Bytes
Versions: 274
Compression:
Stored size: 308 Bytes
Contents
package clock import "fmt" const testVersion = 4 type Clock int func New(h, m int) Clock { c := Clock((h*60 + m) % 1440) if c < 0 { c += 1440 } return c } func (c Clock) Add(m int) Clock { return New(0, int(c)+m) } func (c Clock) String() string { return fmt.Sprintf("%02d:%02d", c/60, c%60) }
Version data entries
274 entries across 274 versions & 1 rubygems