{"width":"100%","published":"2014-04-08 02:01:58","url":"https://y0m0r.hateblo.jp/entry/20140408/1396976518","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fy0m0r.hateblo.jp%2Fentry%2F20140408%2F1396976518\" title=\"golang\u30672\u3064\u306e\u65e5\u4ed8\u9593\u306e\u6708\u6570\u3092\u53d6\u5f97\u3059\u308b - \u30e1\u30e2\u7f6e\u304d\u5834\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","version":"1.0","description":"\u95a2\u9023\uff1aPython2\u30672\u3064\u306e\u65e5\u4ed8\u9593\u306e\u6708\u6570\u3092\u53d6\u5f97\u3059\u308b - brainstormgo\u3067\u3082\u66f8\u3044\u3066\u307f\u305f\u3002 Duration\u4f7f\u3063\u3066\u3082\u3067\u304d\u305d\u3046 package main import ( \"fmt\" \"time\" ) // get months between two dates. func MonthDiff(d1, d2 time.Time) int { if d2.After(d1) { d1, d2 = d2, d1 } return (d1.Year()-d2.Year())*12 + int(d1.Month()) - int(d2.Month()) } func main() { d1 :=\u2026","provider_url":"https://hatena.blog","height":"190","blog_title":"\u30e1\u30e2\u7f6e\u304d\u5834","categories":["golang"],"image_url":null,"title":"golang\u30672\u3064\u306e\u65e5\u4ed8\u9593\u306e\u6708\u6570\u3092\u53d6\u5f97\u3059\u308b","provider_name":"Hatena Blog","author_name":"yuheiomori0718","author_url":"https://blog.hatena.ne.jp/yuheiomori0718/","blog_url":"https://y0m0r.hateblo.jp/","type":"rich"}