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


##########
docs/sql-manual/sql-functions/scalar-functions/date-time-functions/months-diff.md:
##########
@@ -24,25 +24,36 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-## months_diff
-### description
-#### Syntax
+## Description
+The `MONTHS_DIFF` function calculates the number of complete months between 
two dates. It accepts two date arguments and returns the difference in months 
as an integer.
 
-`INT months_diff(DATETIME enddate, DATETIME startdate)`
+## Syntax
 
-The difference between the start time and the end time is months
+`MONTHS_DIFF(<enddate>, <startdate>)`
 
-### example
+## Parameters
 
-```
-mysql> select months_diff('2020-12-25','2020-10-25');
-+-----------------------------------------------------------+
-| months_diff('2020-12-25 00:00:00', '2020-10-25 00:00:00') |
-+-----------------------------------------------------------+
-|                                                         2 |
-+-----------------------------------------------------------+
-```
+| 参数            | 说明         |
+|---------------|------------|
+| `<enddate>`   | end date   |
+| `<startdate>` | start date |
+
+## Return Value
 
-### keywords
+returns the number of months resulting from `<enddate>` minus `<startdate>`
+- When either `<enddate>` or `<startdate>` is NULL, or both are NULL, it 
returns NULL
+- When either `<enddate>` or `<startdate>` is `0000-00-00`, or both are 
`0000-00-00`, it returns NULL

Review Comment:
   这里的 0000-00-00 可能和第一行是一个情况,直接写这个字符串,会被认为是一个非法的时间,进而转换为了 NULL



##########
docs/sql-manual/sql-functions/scalar-functions/date-time-functions/seconds-diff.md:
##########
@@ -24,25 +24,37 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-## seconds_diff
-### description
-#### Syntax
+## Description
+The `SECONDS_DIFF` function calculates the time difference in seconds between 
two datetime values. It accepts two datetime arguments and returns the 
difference as the value of `<end_datetime>` minus `<start_datetime>`.
 
-`INT seconds_diff(DATETIME enddate, DATETIME startdate)`
+## Syntax
 
-The difference between the start time and the end time is seconds
+`seconds_diff(<end_datetime>, <start_datetime>)`

Review Comment:
   函数名大写



##########
docs/sql-manual/sql-functions/scalar-functions/date-time-functions/months-diff.md:
##########
@@ -24,25 +24,36 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-## months_diff
-### description
-#### Syntax
+## Description
+The `MONTHS_DIFF` function calculates the number of complete months between 
two dates. It accepts two date arguments and returns the difference in months 
as an integer.
 
-`INT months_diff(DATETIME enddate, DATETIME startdate)`
+## Syntax
 
-The difference between the start time and the end time is months
+`MONTHS_DIFF(<enddate>, <startdate>)`

Review Comment:
   使用code block 而不是 inline code
   ```sql
   `MONTHS_DIFF(<end_date>, <start_date>)`
   ```



##########
docs/sql-manual/sql-functions/scalar-functions/date-time-functions/months-diff.md:
##########
@@ -24,25 +24,36 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-## months_diff
-### description
-#### Syntax
+## Description
+The `MONTHS_DIFF` function calculates the number of complete months between 
two dates. It accepts two date arguments and returns the difference in months 
as an integer.
 
-`INT months_diff(DATETIME enddate, DATETIME startdate)`
+## Syntax
 
-The difference between the start time and the end time is months
+`MONTHS_DIFF(<enddate>, <startdate>)`
 
-### example
+## Parameters
 
-```
-mysql> select months_diff('2020-12-25','2020-10-25');
-+-----------------------------------------------------------+
-| months_diff('2020-12-25 00:00:00', '2020-10-25 00:00:00') |
-+-----------------------------------------------------------+
-|                                                         2 |
-+-----------------------------------------------------------+
-```
+| 参数            | 说明         |
+|---------------|------------|
+| `<enddate>`   | end date   |
+| `<startdate>` | start date |

Review Comment:
   说明过于简略了



-- 
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