Skip to content

Commit

Permalink
Update Leaf docs to accept time zone IDs as argument in #date tag
Browse files Browse the repository at this point in the history
  • Loading branch information
fpseverino committed Jul 9, 2024
1 parent e6dcb13 commit 7e13d73
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/leaf/overview.it.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,12 @@ Puoi passare una stringa in un formato di data personalizzato come secondo argom
The date is #date(now, "yyyy-MM-dd")
```

Puoi anche passare l'ID di un fuso orario come terzo argomento. Guarda [`DateFormatter.timeZone`](https://developer.apple.com/documentation/foundation/dateformatter/1411406-timezone) e [`TimeZone`](https://developer.apple.com/documentation/foundation/timezone) di Swift per più informazioni.

```leaf
The date is #date(now, "yyyy-MM-dd", "America/New_York")
```

#### `#unsafeHTML`

Il tag `#unsafeHTML` agisce come un tag di variabile - p.es. `#(variable)`. Però non evade nessun HTML che `variable` potrebbe contenere:
Expand Down
6 changes: 6 additions & 0 deletions docs/leaf/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,12 @@ You can pass a custom date formatter string as the second argument. See Swift's
The date is #date(now, "yyyy-MM-dd")
```

You can also pass a time zone ID for the date formatter as the third argument. See Swift's [`DateFormatter.timeZone`](https://developer.apple.com/documentation/foundation/dateformatter/1411406-timezone) and [`TimeZone`](https://developer.apple.com/documentation/foundation/timezone) for more information.

```leaf
The date is #date(now, "yyyy-MM-dd", "America/New_York")
```

#### `#unsafeHTML`

The `#unsafeHTML` tag acts like a variable tag - e.g. `#(variable)`. However it does not escape any HTML that `variable` may contain:
Expand Down

0 comments on commit 7e13d73

Please sign in to comment.