From a20bdc7fd8fc9e94f0dd1059a8ba217438710872 Mon Sep 17 00:00:00 2001 From: uppfinnarn Date: Thu, 28 Jul 2016 22:36:59 +0200 Subject: [PATCH] Comments --- types.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/types.go b/types.go index b9541bb..c7c6dd3 100644 --- a/types.go +++ b/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)) }