diff --git a/docs/leaf/overview.it.md b/docs/leaf/overview.it.md index fae1757b2..8e1533d3d 100644 --- a/docs/leaf/overview.it.md +++ b/docs/leaf/overview.it.md @@ -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: diff --git a/docs/leaf/overview.md b/docs/leaf/overview.md index b10351894..e1f4ff414 100644 --- a/docs/leaf/overview.md +++ b/docs/leaf/overview.md @@ -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: