Nyall Dawson 709c14391b Change expression help from free form html files to structured json
A new script then parses these json help files into the html help
contents, in a standardised manner. Previously, the function help
was a bunch of different formats and structures.

Now, a custom stylesheet can be applied (and later tweaked!) to
format these help. Eg, this commit colors variables and function
names in the syntax section for greater readability.
2015-09-02 14:22:50 +10:00

17 lines
821 B
Plaintext

{
"function": "month",
"description": "Extract the week number from a date, or the number of weeks from an interval.",
"variants": [
{ "variant": "Date variant",
"variant_description": "Extract the week number from a date or datetime.",
"arguments": [ {"arg":"date","description":"a date or datetime value"}],
"examples": [ { "expression":"week('2012-05-12')", "returns":"19"}] },
{
"variant": "Interval variant",
"variant_description": "Calculate the length in weeks of an interval.",
"arguments": [ {"arg":"interval","description":"interval value to return number of months from"}],
"examples": [ { "expression":"week(tointerval('3 weeks'))", "returns":"3"},
{ "expression":"week(age('2012-01-01','2010-01-01'))", "returns":"104.285"}]
}]
}