This is an automated email from the ASF dual-hosted git repository. panxiaolei pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push: new 9229df5d02b add document of year of week (#2169) 9229df5d02b is described below commit 9229df5d02b1e1d90fe58921fae1bd7bfccd6fc8 Author: Pxl <pxl...@qq.com> AuthorDate: Thu Mar 13 11:53:52 2025 +0800 add document of year of week (#2169) ## Versions - [x] dev - [ ] 3.0 - [ ] 2.1 - [ ] 2.0 ## Languages - [x] Chinese - [x] English ## Docs Checklist - [ ] Checked by AI - [ ] Test Cases Built --- .../date-time-functions/year-of-week.md | 68 +++++++++++++++++++++ .../date-time-functions/year-of-week.md | 70 ++++++++++++++++++++++ 2 files changed, 138 insertions(+) diff --git a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/year-of-week.md b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/year-of-week.md new file mode 100644 index 00000000000..0ebdc21f942 --- /dev/null +++ b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/year-of-week.md @@ -0,0 +1,68 @@ +--- +{ + "title": "YEAR_OF_WEEK", + "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. +--> + + +## year + +year_of_week + +## Description + +Return to the `ISO week date` standard year, please refer to [ISO Week date](https://en.wikipedia.org/wiki/ISO_week_date). + +## Alias + +- yow + +## Syntax + +```sql +SMALLINT year_of_week(DATE value) +``` + +## Parameters + +| Parameters | Description | +| -- | -- | +| `<value>` | A date for calculate the year of week | + +## 返回值 + +Return to the `ISO week date` standard year + +## example + +``` +mysql> select year_of_week('2005-01-01'); ++-----------------------------+ +| year_of_week('2005-01-01') | ++-----------------------------+ +| 2004 | ++-----------------------------+ +``` + +### keywords + YEAR_OF_WEEK diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/year-of-week.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/year-of-week.md new file mode 100644 index 00000000000..731801463c7 --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/year-of-week.md @@ -0,0 +1,70 @@ +--- +{ + "title": "YEAR_OF_WEEK", + "language": "zh-CN" +} +--- + +<!-- +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. +--> + +## year_of_week + +year_of_week + +## 描述 + +求 `ISO week date` 标准的周年,与年的区别可以参见 [ISO周日历](https://zh.wikipedia.org/wiki/ISO%E9%80%B1%E6%97%A5%E6%9B%86) 。 + +## 别名 + +- yow + +## 语法 + + +```sql +SMALLINT year_of_week(DATE value) +``` + + +## 参数 + +| 参数 | 说明 | +| -- | -- | +| `<value>` | 需要求周年的日期 | + +## 返回值 + +返回 `ISO week date` 标准的周年。 + +## 举例 + +``` +mysql> select year_of_week('2005-01-01'); ++-----------------------------+ +| year_of_week('2005-01-01') | ++-----------------------------+ +| 2004 | ++-----------------------------+ +``` + +### keywords + + YEAR_OF_WEEK --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org