Template Variables: Difference between revisions
Jump to navigation
Jump to search
| Line 985: | Line 985: | ||
== Dates == | == Dates == | ||
You can use PHP strftime format strings to create custom time formats. Information on PHP strftime strings is available at [http://php.net/manual/en/function.strftime.php] | |||
[DAYSBETWEEN:2019-11-01:2019-11-10] - this template variable will calculate the number of days between the :: the dates need to be in yyyy-mm-dd format. Template variables can be used for calculation. | [DAYSBETWEEN:2019-11-01:2019-11-10] - this template variable will calculate the number of days between the :: the dates need to be in yyyy-mm-dd format. Template variables can be used for calculation. | ||
Example: [[DAYSBETWEEN:[FIRSTNIGHT:+5 days{%G-%m-%d}]:[CURRENTDATE:{%G-%m-%d}]] will calculate the days between 5 days after check-in and today. | Example: [[DAYSBETWEEN:[FIRSTNIGHT:+5 days{%G-%m-%d}]:[CURRENTDATE:{%G-%m-%d}]] will calculate the days between 5 days after check-in and today. | ||
[FIRSTNIGHT:{%A, %e %B, %Y}] - first night booked | [FIRSTNIGHT:{%A, %e %B, %Y}] - first night booked | ||