uppfinnarn 8 年之前
父节点
当前提交
a20bdc7fd8
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      types.go

+ 3 - 0
types.go

@@ -13,8 +13,11 @@ import (
 	"time"
 )
 
+// A timestamp, in the format YYYY-MM-DDTHH:MM:SS.MSMSMS-TZ:TZ.
 type Timestamp string
 
+// Parse parses a timestamp string into a time.Time object.
+// The only time this can fail is if you're parsing an invalid timestamp.
 func (t Timestamp) Parse() (time.Time, error) {
 	return time.Parse("2006-01-02T15:04:05.000000-07:00", string(t))
 }