Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

[master < T618] Add docs for date module #999

Merged
merged 4 commits into from
Aug 24, 2023

Conversation

ind1xa
Copy link
Contributor

@ind1xa ind1xa commented Aug 16, 2023

Description

Added documentation for date module.

Pull request type

Please delete options that are not relevant and check the ones that are.

  • New documentation page

Related PRs and issues

PR this doc page is related to: memgraph/mage#291
Closes (link to issue):

Checklist:

  • I checked all content with Grammarly
  • I performed a self-review of my code
  • I made corresponding changes to the rest of the documentation
  • The build passes locally
  • My changes generate no new warnings or errors

@ind1xa ind1xa added the status: ready PR is ready for review label Aug 16, 2023
@ind1xa ind1xa requested a review from vpavicic as a code owner August 16, 2023 12:28
@ind1xa ind1xa self-assigned this Aug 16, 2023
@ind1xa ind1xa requested a review from kgolubic as a code owner August 16, 2023 12:28
Comment on lines +48 to +71
:::info

The unit parameter supports the following values:
- "ms" for milliseconds
- "s" for seconds
- "m" for minutes
- "h" for hours
- "d" for days

:::

:::info

The format parameter supports values defined under [Python strftime format codes](https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes).

:::

:::info

The timezone parameter can be specified with the database TZ identifier (text) name, as listed for [timezones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).

:::

#### Output:
Copy link
Collaborator

Choose a reason for hiding this comment

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

IF you have these many info boxes they kind of start losing meaning... :)

It's just regular text and info about the module

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I really like it this way because it draws attention and those infos are really important since the usage of procedures is different from neo4j so I wanted it to be highlighted


```cypher
CALL date.parse("2023/08/03 14:30:00", "h", "%Y/%m/%d %H:%M:%S", "Europe/Zagreb")
YIELD parsed RETURN parsed
Copy link
Collaborator

Choose a reason for hiding this comment

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

;

#### Usage:

```cypher
CALL temporal.format(duration({minute: 127}), "%H:%M:%S") YIELD formatted RETURN formatted
Copy link
Collaborator

Choose a reason for hiding this comment

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

;

Copy link
Contributor

@kgolubic kgolubic left a comment

Choose a reason for hiding this comment

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

@ind1xa once you remove temporal I'll merge this. Everything looks OK.

@ind1xa
Copy link
Contributor Author

ind1xa commented Aug 23, 2023

@kgolubic done, i removed temporal

@ind1xa ind1xa changed the title [master < T618] Add docs for temporal and date module [master < T618] Add docs for date module Aug 23, 2023
@ind1xa ind1xa requested a review from kgolubic August 23, 2023 11:21
@kgolubic kgolubic merged commit 44f7232 into master Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: ready PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants