Merge commit '9b0050e9aabe4be65c78ccf292a348f309d50ccd' as 'docs'

```
git subtree add --prefix=docs/ https://github.com/gohugoio/hugoDocs.git master --squash
```

Closes #11925
This commit is contained in:
Bjørn Erik Pedersen
2024-01-27 10:48:33 +01:00
1158 changed files with 64103 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
---
title: Abs
description: Returns the absolute value of the given time.Duration value.
categories: []
keywords: []
action:
related:
- functions/time/Duration
- functions/time/ParseDuration
returnType: time.Duration
signatures: [DURATION.Abs]
---
```go-html-template
{{ $d = time.ParseDuration "-3h" }}
{{ $d.Abs }} → 3h0m0s
```

View File

@@ -0,0 +1,17 @@
---
title: Hours
description: Returns the time.Duration value as a floating point number of hours.
categories: []
keywords: []
action:
related:
- functions/time/Duration
- functions/time/ParseDuration
returnType: float64
signatures: [DURATION.Hours]
---
```go-html-template
{{ $d = time.ParseDuration "3.5h2.5m1.5s" }}
{{ $d.Hours }} → 3.5420833333333333
```

View File

@@ -0,0 +1,17 @@
---
title: Microseconds
description: Returns the time.Duration value as an integer microsecond count.
categories: []
keywords: []
action:
related:
- functions/time/Duration
- functions/time/ParseDuration
returnType: int64
signatures: [DURATION.Microseconds]
---
```go-html-template
{{ $d = time.ParseDuration "3.5h2.5m1.5s" }}
{{ $d.Microseconds }} → 12751500000
```

View File

@@ -0,0 +1,17 @@
---
title: Milliseconds
description: Returns the time.Duration value as an integer millisecond count.
categories: []
keywords: []
action:
related:
- functions/time/Duration
- functions/time/ParseDuration
returnType: int64
signatures: [DURATION.Milliseconds]
---
```go-html-template
{{ $d = time.ParseDuration "3.5h2.5m1.5s" }}
{{ $d.Milliseconds }} → 12751500
```

View File

@@ -0,0 +1,17 @@
---
title: Minutes
description: Returns the time.Duration value as a floating point number of minutes.
categories: []
keywords: []
action:
related:
- functions/time/Duration
- functions/time/ParseDuration
returnType: float64
signatures: [DURATION.Minutes]
---
```go-html-template
{{ $d = time.ParseDuration "3.5h2.5m1.5s" }}
{{ $d.Minutes }} → 212.525
```

View File

@@ -0,0 +1,17 @@
---
title: Nanoseconds
description: Returns the time.Duration value as an integer nanosecond count.
categories: []
keywords: []
action:
related:
- functions/time/Duration
- functions/time/ParseDuration
returnType: int64
signatures: [DURATION.Nanoseconds]
---
```go-html-template
{{ $d = time.ParseDuration "3.5h2.5m1.5s" }}
{{ $d.Nanoseconds }} → 12751500000000
```

View File

@@ -0,0 +1,20 @@
---
title: Round
description: Returns the result of rounding DURATION1 to the nearest multiple of DURATION2.
categories: []
keywords: []
action:
related:
- functions/time/Duration
- functions/time/ParseDuration
returnType:
signatures: [DURATION1.Round DURATION2]
---
```go-html-template
{{ $d = time.ParseDuration "3.5h2.5m1.5s" }}
{{ $d.Round (time.ParseDuration "2h") }} → 4h0m0s
{{ $d.Round (time.ParseDuration "3m") }} → 3h33m0s
{{ $d.Round (time.ParseDuration "4s") }} → 3h32m32s
```

View File

@@ -0,0 +1,17 @@
---
title: Seconds
description: Returns the time.Duration value as a floating point number of seconds.
categories: []
keywords: []
action:
related:
- functions/time/Duration
- functions/time/ParseDuration
returnType: float64
signatures: [DURATION.Seconds]
---
```go-html-template
{{ $d = time.ParseDuration "3.5h2.5m1.5s" }}
{{ $d.Seconds }} → 12751.5
```

View File

@@ -0,0 +1,21 @@
---
title: Truncate
description: Returns the result of rounding DURATION1 toward zero to a multiple of DURATION2.
categories: []
keywords: []
action:
related:
related:
- functions/time/Duration
- functions/time/ParseDuration
returnType: time.Duration
signatures: [DURATION1.Truncate DURATION2]
---
```go-html-template
{{ $d = time.ParseDuration "3.5h2.5m1.5s" }}
{{ $d.Truncate (time.ParseDuration "2h") }} → 2h0m0s
{{ $d.Truncate (time.ParseDuration "3m") }} → 3h30m0s
{{ $d.Truncate (time.ParseDuration "4s") }} → 3h32m28s
```

View File

@@ -0,0 +1,12 @@
---
title: Duration methods
linkTitle: Duration
description: Use these methods with time.Duration values.
categories: []
keywords: []
menu:
docs:
parent: methods
---
Use these methods with time.Duration values.