morrySnow commented on code in PR #2251:
URL: https://github.com/apache/doris-website/pull/2251#discussion_r2026768627


##########
docs/sql-manual/sql-functions/scalar-functions/date-time-functions/months-between.md:
##########
@@ -0,0 +1,73 @@
+---
+{
+    "title": "MONTHS_BETWEEN",
+    "language": "en"
+}
+---
+
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## Description
+The `MONTHS_BETWEEN` function calculates the floating-point number of months 
between two dates. It receives two date arguments and a optional boolean 
argument.
+
+## Syntax
+
+```sql
+MONTHS_BETWEEN(<enddate>, <startdate> [, <round_type>])
+```
+
+## Parameters
+
+| Parameter         | Description                                              
  |
+|-------------------|------------------------------------------------------------|
+| `<enddate>`   | The ending date, representing the later date in the 
difference calculation. Supports `DATE` (e.g., `YYYY-MM-DD`) or `DATETIME` 
(e.g., `YYYY-MM-DD HH:MM:SS`) types.     |
+| `<startdate>` | The starting date, representing the earlier date in the 
difference calculation. Supports `DATE` (e.g., `YYYY-MM-DD`) or `DATETIME` 
(e.g., `YYYY-MM-DD HH:MM:SS`) types. |
+| `<round_type>` | Whether to round the result to the eighth decimal place. 
Supports `true` or `false`. Default is `true`. |
+
+## Return Value
+
+returns the floating-point number of months resulting from `<enddate>` minus 
`<startdate>`
+
+result = (`<enddate>.year` - `<startdate>.year`) * 12 + `<enddate>.month` - 
`<startdate>.month` + (`<enddate>.day` - `<startdate>.day`) / 31.0
+
+- When either `<enddate>` or `<startdate>` is NULL, or both are NULL, it 
returns NULL
+- When `<round_type>` is `true`, the result is rounded to the eighth decimal 
place.
+
+## Example
+
+```sql
+select months_between('2020-12-26','2020-10-25'),months_between('2020-10-25 
10:00:00','2020-12-26 11:00:00',false);
+```
+
+```text
++-------------------------------------------+-------------------------------------------------------------------+
+| months_between('2020-12-26','2020-10-25') | months_between('2020-10-25 
10:00:00','2020-12-26 11:00:00',false) |
++-------------------------------------------+-------------------------------------------------------------------+
+|                                2.03225806 |                                  
              -2.032258064516129 |
++-------------------------------------------+-------------------------------------------------------------------+
+```
+
+**Note:**
+When both `<enddate>` and `<startdate>` are the last day of their respective 
months, the function applies special handling.It returns the full month 
difference without considering the fractional part based on days. This ensures 
consistency when comparing the end of one month to the end of another.

Review Comment:
   move this note into Description.



##########
docs/sql-manual/sql-functions/scalar-functions/string-functions/xpath-string.md:
##########
@@ -0,0 +1,110 @@
+---
+{
+    "title": "XPATH_STRING",
+    "language": "en"
+}
+---
+
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## Description
+
+The XPATH_STRING function is used to parse the XML string and return the first 
XML node that matches the XPath expression.
+
+## Syntax
+
+```sql
+XPATH_STRING(<xml_string>, <xpath_expression>)
+```
+
+## Parameters
+| Parameter | Description                                   |
+| --------- | ----------------------------------------------|
+| `<xml_string>` | Source string. Type: VARCHAR             |
+| `<xpath_expression>` | XPath expression. Type: VARCHAR    |

Review Comment:
   need add a syntax manual about xpath



##########
docs/sql-manual/sql-functions/scalar-functions/date-time-functions/next-day.md:
##########
@@ -0,0 +1,71 @@
+---
+{
+    "title": "NEXT_DAY",
+    "language": "en"
+}
+---
+
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## Description
+The NEXT_DAY function is used to return the first date that is later than the 
given date and matches the specified day of the week.
+
+## Syntax
+
+```sql
+NEXT_DAY(<datetime/date>, <day_of_week>)
+```
+
+## Parameters
+
+| Parameter         | Description                                              
     |
+|-------------------|---------------------------------------------------------------|
+| `<datetime/date>` | The date which will be used to find the next day of the 
week. |
+| `<day_of_week>`   | A STRING expression identifying a day of the week.       
     |
+
+## Return Value
+A DATE value whatever the input is DATETIME or DATE.
+
+
+`<day_of_week>` must be one of the following (case insensitive):
+- 'SU', 'SUN', 'SUNDAY'
+- 'MO', 'MON', 'MONDAY'
+- 'TU', 'TUE', 'TUESDAY'
+- 'WE', 'WED', 'WEDNESDAY'
+- 'TH', 'THU', 'THURSDAY'
+- 'FR', 'FRI', 'FRIDAY'
+- 'SA', 'SAT', 'SATURDAY'

Review Comment:
   move into Parameters chapter



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to