Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Create a new time entry.

| Option | Short | Required | Description |
|---|---|---|---|
| `--date` | `-d` | yes | Date: `YYYY/MM/DD`, `today`, or `yesterday` |
| `--date` | `-d` | no | Date: `YYYY/MM/DD`, `today`, or `yesterday` (default: today) |
| `--work-item` | `-w` | yes | Work Item ID |
| `--length` | `-l` | yes | Duration in hours (e.g. `0.5`, `1.5`) |
| `--type` | `-t` | yes | Activity type name (see `activities`) |
Expand All @@ -129,8 +129,8 @@ Create a new time entry.
| `--dry-run` | | no | Preview the entry locally without submitting |

```bash
# Log 2 hours of development on today
timetracker add -d today -w 12345 -l 2 -t Development -c "Feature X"
# Log 2 hours of development today (date defaults to today)
timetracker add -w 12345 -l 2 -t Development -c "Feature X"

# Log half an hour of a meeting starting at 14:00
timetracker add -d 2026/06/19 -w 12345 -l 0.5 -t Meeting -h 14:00
Expand Down
2 changes: 1 addition & 1 deletion Timetracker.Console/Options/AddOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Timetracker.Options;
[Verb("add", HelpText = "Add a new activity directly to the server.")]
public class AddOptions
{
[Option('d', "date", Required = true, HelpText = "Specify the date for the activity in the format YYYY/MM/DD (e.g., 2025/12/31).")]
[Option('d', "date", Required = false, Default = "today", HelpText = "Date for the activity: YYYY/MM/DD (e.g., 2025/12/31), 'today' or 'yesterday'. Defaults to today.")]
public string ActivityDate { get; set; }

[Option('w', "work-item", Required = true, HelpText = "Specify the Work Item ID associated with the activity.")]
Expand Down
Loading