time.Month to number string

845 views
Skip to first unread message

Victor Song

unread,
Apr 30, 2013, 10:55:38 AM4/30/13
to golan...@googlegroups.com
Hi, is there a simple way to convert a time.Month variable to a number string? For example, time.January is converted to "0", time.February to "1", and so on.

Volker Dobler

unread,
Apr 30, 2013, 10:58:14 AM4/30/13
to golan...@googlegroups.com
fmt.Printf("%d", time.May)
Reply all
Reply to author
Forward
Message has been deleted
0 new messages