Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/guidelines/language/formatting/timezones.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Use colons (:) to split times between hours, minutes, and seconds.
<div className="dos-and-donts" markdown="true">
<div className="dos" markdown="true">

- hh:mm:ss
- hh\:mm\:ss
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

While escaping the colons fixes the rendering issue, a more idiomatic and robust approach in Markdown is to use backticks for inline code formatting. This clearly designates the string as a format example and prevents any special character interpretation, eliminating the need for manual escaping.

For consistency, you might consider applying this to other format examples throughout the file.

- `hh:mm:ss`

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is a good idea. I thought about this. However, that would require to change Ann and also the rendering. I think this is not what we want. @tokyojen What do you think. Should we change all formats to the hh:mm:ss writing. That would render the formats a bit different.


</div>
<div className="donts" markdown="true">
Expand All @@ -50,8 +50,8 @@ Use periods (.) to add milliseconds and nanoseconds, not a colon (:) according t
<div className="dos-and-donts" markdown="true">
<div className="dos" markdown="true">

- hh:mm:ss.mms
- hh:mm:ss.sss (ISO 8601 standard)
- hh\:mm\:ss.mms
- hh\:mm\:ss.sss (ISO 8601 standard)
Comment on lines +53 to +54
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Similarly, using backticks for inline code formatting is the preferred method for representing these format strings. It improves readability and is less error-prone than manual character escaping.

- `hh:mm:ss.mms`
- `hh:mm:ss.sss` (ISO 8601 standard)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@danielleroux Do you know who hh:mm:ss.mms renders in the docs page. Looks like the cleaner solution for the problem

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What exactly do you mean with "who renders"?

- 0:00:00.920

</div>
Expand Down Expand Up @@ -279,4 +279,4 @@ Use "recent" for past events that have just happened.

- [Dates](./date.mdx)
- [Time picker](../../../components/time-picker/index.mdx)
- [CLDR set of time zones (external link)](https://cldr.unicode.org/translation/time-zones-and-city-names)
- [CLDR set of time zones (external link)](https://cldr.unicode.org/translation/time-zones-and-city-names)
Loading