<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # Go 時間 Go提供了對時間和一段時間的支持。這里有一些例子。 ```go package main import "fmt" import "time" func main() { p := fmt.Println // 從獲取當前時間開始 now := time.Now() p(now) // 你可以提供年,月,日等來創建一個時間。當然時間 // 總是會和地區聯系在一起,也就是時區 then := time.Date(2009, 11, 17, 20, 34, 58, 651387237, time.UTC) p(then) // 你可以獲取時間的各個組成部分 p(then.Year()) p(then.Month()) p(then.Day()) p(then.Hour()) p(then.Minute()) p(then.Second()) p(then.Nanosecond()) p(then.Location()) // 輸出當天是周幾,Monday-Sunday中的一個 p(then.Weekday()) // 下面的幾個方法判斷兩個時間的順序,精確到秒 p(then.Before(now)) p(then.After(now)) p(then.Equal(now)) // Sub方法返回兩個時間的間隔(Duration) diff := now.Sub(then) p(diff) // 可以以不同的單位來計算間隔的大小 p(diff.Hours()) p(diff.Minutes()) p(diff.Seconds()) p(diff.Nanoseconds()) // 你可以使用Add方法來為時間增加一個間隔 // 使用負號表示時間向前推移一個時間間隔 p(then.Add(diff)) p(then.Add(-diff)) } ``` 運行結果 ``` 2014-03-02 22:54:40.561698065 +0800 CST 2009-11-17 20:34:58.651387237 +0000 UTC 2009 November 17 20 34 58 651387237 UTC Tuesday true false false 37578h19m41.910310828s 37578.328308419674 2.2546996985051804e+06 1.3528198191031083e+08 135281981910310828 2014-03-02 14:54:40.561698065 +0000 UTC 2005-08-05 02:15:16.741076409 +0000 UTC ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看