-
Notifications
You must be signed in to change notification settings - Fork 0
qpdate
M-C Pronovost edited this page Nov 12, 2022
·
3 revisions
qpdate("2022-10-31T13:50:14.836475-04:00")
The qpdate() method returns a localized human-friendly date with, without or only time.
It was originally created to take a Django aware datetime.
qpfilters.qpdate(value, lang, tz, show)
Parameter | Type | Description |
---|---|---|
value | string | null |
Optional. A datetime. Default: the current datetime. |
lang | string |
Optional. A BCP 47 language tag. Default: "fr". |
tz | string |
Optional. A IANA timezone name. Default: "America/Toronto". |
show | string |
Optional. A string between "full", "date" or "time". Default: "full". |
qpdate("2022-10-31T13:50:14.836475-04:00")
31 octobre 2022 à 13:50
qpdate("2022-10-31T13:50:14.836475-04:00", "pl", "Europe/Warsaw")
31 października 2022 à 18:50
qpdate("2022-10-31T13:50:14.836475-04:00", "pl", "Europe/Warsaw", "date")
31 października 2022
qpdate("2022-10-31T13:50:14.836475-04:00", "pl", "Europe/Warsaw", "time")
18:50