feat(Go-StudyExample):2020/12/25:新增carbon时间操作库使用示例

This commit is contained in:
Huangzj
2020-12-25 17:32:40 +08:00
parent 0a2e5e71a6
commit 50815504c6
7 changed files with 220 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
/*
* @Author : huangzj
* @Time : 2020/12/25 15:23
* @Description
*/
package carbon
import (
"fmt"
"github.com/uniplaces/carbon"
"log"
"testing"
"time"
)
func TestTimeCreate(t *testing.T) {
c, err := carbon.Create(2020, time.July, 24, 20, 0, 0, 0, "Japan")
if err != nil {
log.Fatal(err)
}
fmt.Printf("The opening ceremony of next olympics will start at %s in Japan\n", c)
}