Skip to content

Conversation

@xyfsjq
Copy link
Contributor

@xyfsjq xyfsjq commented Mar 19, 2025

Versions

  • dev
  • 3.0
  • 2.1
  • 2.0

Languages

  • Chinese
  • English

Docs Checklist

  • Checked by AI
  • Test Cases Built

## Syntax

### example
`TO_MONDAY(<date>)`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`TO_MONDAY(<date>)`
```sql
TO_MONDAY(<date>)
```

## Example

```sql
SELECT TO_MONDAY('2020-1-1'),TO_MONDAY('2022-7-1 10:11:11');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is better to add case 1970-01-02

## Syntax

If there are no parameters, the current time is converted into a timestamp.
`UNIX_TIMESTAMP (<date>[, <fmt>])`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`UNIX_TIMESTAMP (<date>[, <fmt>])`
```sql
UNIX_TIMESTAMP (<date>[, <fmt>])
```

## Syntax

|Mode |First day of week |Range |Week 1 is the first week … |
`WEEK(<date>[, <mode>])`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto


## Syntax

`WEEKOFYEAR (<date>)`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`WEEKOFYEAR (<date>)`
```sql
WEEKOFYEAR(<date>)
```

@xyfsjq xyfsjq requested a review from morrySnow March 20, 2025 03:01
@KassieZ
Copy link
Contributor

KassieZ commented Apr 23, 2025

request review @morrySnow

## Syntax

```sql
WEEKOFYEAR (<date>)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要类似 yearweek,写清楚计算 week 的逻辑是什么


|Mode |First day of week |Range |Week 1 is the first week … |
```sql
WEEK(<date>[, <mode>])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是不是和 yearweek 是一个函数?如果是的话,保留一个,然后另外一个作为它的别名

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants