some godoc

This commit is contained in:
Hayden Parker
2016-02-06 01:42:47 -08:00
parent 600118d140
commit 2b64fcaf33
4 changed files with 43 additions and 0 deletions

View File

@ -6,6 +6,13 @@ import (
type Date [8]byte
//
// Time takes the value stored in date as an 8
// byte big-endian integer representing the
// number of milliseconds since the beginning
// of unix time and converts it to a go time.Time
// struct.
//
func (date Date) Time() time.Time {
seconds := Integer(date[:])
return time.Unix(0, int64(seconds*1000000))