Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

carbon

> 数据库
Open source

A simple, semantic and developer-friendly time package for golang

5.2K stars0 likes2 views
WebsiteGitHub

About

A simple, semantic and developer-friendly time package for golang

English | [简体中文](README.cn.md) | [日本語](README.ja.md) | [한국어](README.ko.md)

Introduction

Carbon is a lightweight, semantic, and developer-friendly golang time package that doesn't depend on any third-party package, has 100% unit test coverage, and has been used by docker organization as well as included by awesome-go and hello-github.

Repository

github.com/dromara/carbon

gitee.com/dromara/carbon

gitcode.com/dromara/carbon

Quick Start

Installation

go version >= 1.18

go
// Via github
go get -u github.com/dromara/carbon/v2
import "github.com/dromara/carbon/v2"

// Via gitee
go get -u gitee.com/dromara/carbon/v2
import "gitee.com/dromara/carbon/v2"

// Via gitcode
go get -u gitcode.com/dromara/carbon/v2
import "gitcode.com/dromara/gitcode/v2"

Carbon was donated to the dromara organization, the repository URL has changed. If the previous repository used was golang-module/carbon, please replace the original repository with the new repository in go.mod, or execute the following command:

go
go mod edit -replace github.com/golang-module/carbon/v2 = github.com/dromara/carbon/v2

Example Usage

Default timezone is UTC, language locale is English, start day of the week is Monday and weekend days of the week are Saturday and Sunday.

…

For more usage examples, please refer to official document.

For performance test reports, please refer to benchmark report

References

  • briannesbitt/carbon
  • nodatime/nodatime
  • jinzhu/now
  • goframe/gtime
  • jodaOrg/joda-time
  • arrow-py/arrow
  • moment/moment
  • iamkun/dayjs

Contributors

Thanks to all the following who contributed to Carbon:

Translators

Ask for help to translate Carbon in other localized languages

How to add new localized language support to carbon

Sponsors

Carbon is a non-commercial open source project. If you want to support Carbon, you can buy a cup of coffee for developer.

Thanks

Carbon had been being developed with GoLand under the free JetBrains Open Source license, I would like to express my thanks here.

License

Carbon is licensed under the MIT License, see the LICENSE file for details.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Gocalendarcarbondatedatetime

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库