Merge commit 'f96384a3b596f9bc0a3a035970b09b2c601f0ccb'

This commit is contained in:
Bjørn Erik Pedersen
2023-05-22 16:47:07 +02:00
341 changed files with 3107 additions and 4238 deletions

View File

@@ -1,36 +1,28 @@
---
title: now
linktitle: now
description: Returns the current local time
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-04-30
categories: [functions]
menu:
docs:
parent: "functions"
parent: functions
keywords: [dates,time]
signature: ["now"]
workson: []
hugoversion:
relatedfuncs: [Unix,dateFormat]
deprecated: false
aliases: []
---
See [`time.Time`](https://godoc.org/time#Time).
For example, building your site on June 24, 2017, with the following templating:
```
```go-html-template
<div>
<small>&copy; {{ now.Format "2006"}}</small>
<small>&copy; {{ now.Format "2006" }}</small>
</div>
```
would produce the following:
```
```html
<div>
<small>&copy; 2017</small>
</div>