mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-09 15:12:26 +08:00
doc: update doc styles
This commit is contained in:
@@ -67,8 +67,6 @@ import (
|
||||
|
||||
<div STYLE="page-break-after: always;"></div>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/styles/api_doc.css">
|
||||
|
||||
## 文档
|
||||
|
||||
## 注:
|
||||
@@ -108,7 +106,7 @@ import (
|
||||
func AddDay(t time.Time, day int64) time.Time
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/dIGbs_uTdFa)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/dIGbs_uTdFa)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -147,7 +145,7 @@ func main() {
|
||||
func AddHour(t time.Time, hour int64) time.Time
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/rcMjd7OCsi5)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/rcMjd7OCsi5)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -186,7 +184,7 @@ func main() {
|
||||
func AddMinute(t time.Time, minute int64) time.Time
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/nT1heB1KUUK)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/nT1heB1KUUK)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -225,7 +223,7 @@ func main() {
|
||||
func AddYear(t time.Time, year int64) time.Time
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/MqW2ujnBx10)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/MqW2ujnBx10)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -264,7 +262,7 @@ func main() {
|
||||
func BeginOfMinute(t time.Time) time.Time
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/ieOLVJ9CiFT)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/ieOLVJ9CiFT)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -296,7 +294,7 @@ func main() {
|
||||
func BeginOfHour(t time.Time) time.Time
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/GhdGFnDWpYs)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/GhdGFnDWpYs)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -328,7 +326,7 @@ func main() {
|
||||
func BeginOfDay(t time.Time) time.Time
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/94m_UT6cWs9)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/94m_UT6cWs9)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -360,7 +358,7 @@ func main() {
|
||||
func BeginOfWeek(t time.Time, beginFrom ...time.Weekday) time.Time
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/ynjoJPz7VNV)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/ynjoJPz7VNV)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -392,7 +390,7 @@ func main() {
|
||||
func BeginOfMonth(t time.Time) time.Time
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/bWXVFsmmzwL)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/bWXVFsmmzwL)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -424,7 +422,7 @@ func main() {
|
||||
func BeginOfYear(t time.Time) time.Time
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/i326DSwLnV8)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/i326DSwLnV8)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -456,7 +454,7 @@ func main() {
|
||||
func EndOfMinute(t time.Time) time.Time
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/yrL5wGzPj4z)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/yrL5wGzPj4z)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -488,7 +486,7 @@ func main() {
|
||||
func EndOfHour(t time.Time) time.Time
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/6ce3j_6cVqN)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/6ce3j_6cVqN)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -520,7 +518,7 @@ func main() {
|
||||
func EndOfDay(t time.Time) time.Time
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/eMBOvmq5Ih1)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/eMBOvmq5Ih1)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -552,7 +550,7 @@ func main() {
|
||||
func EndOfWeek(t time.Time, endWith ...time.Weekday) time.Time
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/i08qKXD9flf)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/i08qKXD9flf)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -584,7 +582,7 @@ func main() {
|
||||
func EndOfMonth(t time.Time) time.Time
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/_GWh10B3Nqi)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/_GWh10B3Nqi)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -616,7 +614,7 @@ func main() {
|
||||
func EndOfYear(t time.Time) time.Time
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/G01cKlMCvNm)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/G01cKlMCvNm)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -648,7 +646,7 @@ func main() {
|
||||
func GetNowDate() string
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/PvfkPpcpBBf)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/PvfkPpcpBBf)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -677,7 +675,7 @@ func main() {
|
||||
func GetNowTime() string
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/l7BNxCkTmJS)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/l7BNxCkTmJS)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -706,7 +704,7 @@ func main() {
|
||||
func GetNowDateTime() string
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/pI4AqngD0al)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/pI4AqngD0al)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -735,7 +733,7 @@ func main() {
|
||||
func GetTodayStartTime() string
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/84siyYF7t99)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/84siyYF7t99)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -764,7 +762,7 @@ func main() {
|
||||
func GetTodayEndTime() string
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/jjrLnfoqgn3)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/jjrLnfoqgn3)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -793,7 +791,7 @@ func main() {
|
||||
func GetZeroHourTimestamp() int64
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/QmL2oIaGE3q)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/QmL2oIaGE3q)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -822,7 +820,7 @@ func main() {
|
||||
func GetNightTimestamp() int64
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/UolysR3MYP1)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/UolysR3MYP1)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -851,7 +849,7 @@ func main() {
|
||||
func FormatTimeToStr(t time.Time, format string, timezone ...string) string
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/_Ia7M8H_OvE)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/_Ia7M8H_OvE)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -890,7 +888,7 @@ func main() {
|
||||
func FormatStrToTime(str, format string, timezone ...string) (time.Time, error)
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/1h9FwdU8ql4)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/1h9FwdU8ql4)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -929,7 +927,7 @@ type theTime struct {
|
||||
func NewUnixNow() *theTime
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/U4PPx-9D0oz)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/U4PPx-9D0oz)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -961,7 +959,7 @@ type theTime struct {
|
||||
func NewUnix(unix int64) *theTime
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/psoSuh_kLRt)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/psoSuh_kLRt)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -993,7 +991,7 @@ type theTime struct {
|
||||
func NewFormat(t string) (*theTime, error)
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/VkW08ZOaXPZ)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/VkW08ZOaXPZ)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -1025,7 +1023,7 @@ type theTime struct {
|
||||
func NewISO8601(iso8601 string) (*theTime, error)
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/mkhOHQkdeA2)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/mkhOHQkdeA2)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -1054,7 +1052,7 @@ func main() {
|
||||
func (t *theTime) ToUnix() int64
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/_LUiwAdocjy)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/_LUiwAdocjy)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -1083,7 +1081,7 @@ func main() {
|
||||
func (t *theTime) ToFormat() string
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/VkW08ZOaXPZ)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/VkW08ZOaXPZ)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -1112,7 +1110,7 @@ func main() {
|
||||
func (t *theTime) ToFormatForTpl(tpl string) string
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/nyXxXcQJ8L5)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/nyXxXcQJ8L5)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -1142,7 +1140,7 @@ func main() {
|
||||
func (t *theTime) ToIso8601() string
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/mkhOHQkdeA2)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/mkhOHQkdeA2)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -1172,7 +1170,7 @@ func main() {
|
||||
func IsLeapYear(year int) bool
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/xS1eS2ejGew)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/xS1eS2ejGew)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -1205,7 +1203,7 @@ func main() {
|
||||
func BetweenSeconds(t1 time.Time, t2 time.Time) int64
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/n3YDRyfyXJu)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/n3YDRyfyXJu)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -1242,7 +1240,7 @@ func main() {
|
||||
func DayOfYear(t time.Time) int
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/0hjqhTwFNlH)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/0hjqhTwFNlH)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -1283,7 +1281,7 @@ func main() {
|
||||
func IsWeekend(t time.Time) bool
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/cupRM5aZOIY)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/cupRM5aZOIY)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -1323,7 +1321,7 @@ func main() {
|
||||
func NowDateOrTime(format string, timezone ...string) string
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/EZ-begEjtT0)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/EZ-begEjtT0)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -1357,7 +1355,7 @@ func main() {
|
||||
func Timestamp(timezone ...string) int64
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/iU5b7Vvjx6x)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/iU5b7Vvjx6x)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -1388,7 +1386,7 @@ func main() {
|
||||
func TimestampMilli(timezone ...string) int64
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/4gvEusOTu1T)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/4gvEusOTu1T)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -1418,7 +1416,7 @@ func main() {
|
||||
func TimestampMicro(timezone ...string) int64
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/2maANglKHQE)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/2maANglKHQE)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -1448,7 +1446,7 @@ func main() {
|
||||
func TimestampNano(timezone ...string) int64
|
||||
```
|
||||
|
||||
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/A9Oq_COrcCF)</span></b>
|
||||
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/A9Oq_COrcCF)</span></b>
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
Reference in New Issue
Block a user