Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update time parsing #34

Merged
merged 1 commit into from
May 15, 2024
Merged
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
13 changes: 6 additions & 7 deletions src/content/docs/quick-tips/smart-time-entry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ Ontime allows shortcuts to speed and simplify the time entry.

| Note | Entry | Result |
| :------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------- | :---------------------------------------------------------- |
| `.` `,` `:` and `spaces` can be used as separators between `hh:mm:ss` | `0.1` `0 1` `0:1` `0,1` | `00:00:01` |
| `.` `,` `:` and `spaces` can be used as separators between `hh:mm:ss` | `0.1` `0 1` `0:1` `0,1` | `00:01:00` |
| The keyword `p` returns the end time of the previous event | `p` | `09:00:00` (if previous event finishes at 09:00:00) |
| Starting a time entry with a + sign, adds the time to the previous event | `+10:10` | `09:10:10` (if previous event finishes at 09:00:00) |
| Any time overflow is considered | `120` | `02:00:00` (120 minutes) |
| Any time overflow is considered | `0.120` | `00:02:00` (120 seconds) |
| Starting a time entry with a + sign, adds the time to the previous event | `+10m10s ` | `09:10:10` (if previous event finishes at 09:00:00) |
| 0 append is not necessary | `2.2.2` `2 2 2` `2:2:2` `2,2,2` | `02:02:02 |
| Any time input without separators is interpreted in minutes | `120` | `02:00:00` (120 minutes) |
| Enter a full time-tag without separators. Note that you need 6 digits for this `hhmmss`, otherwise it will be considered as minutes | `123456` | `12:34:56` |
| Use a separator as short for 0 | `10:` or `:10` | `10:00:00` or `00:10:00` |
| A single numeric field is read as `minutes` | `10` | `00:10:00` |
| Two numeric fields are read as `minutes:seconds` | `1.2` | `00:01:02` |
| Numeric fields overflow at 2 digits | `120` | `01:20:00` |
| Named numberic fields can overflow | `90m` | `01:30:00` |
| Two numeric fields are read as `hours:minutes` | `1.2` | `01:02:00` |
| Tree numeric fields are read as `hours:minutes:seconds` | `1.2.3` `1 2 3` `1:2:3` `1,2,3` | `01:02:03` |
| Enter a full time-tag without separators. Note that you need 6 digits for this `hhmmss`, otherwise it will be considered as minutes | `123456` | `12:34:56` |