-
Notifications
You must be signed in to change notification settings - Fork 5
New JournalEntry
external help file: JournalCli.dll-Help.xml
Module Name: JournalCli
online version:
schema: 2.0.0
Creates a new journal entry.
Alias: nj
New-JournalEntry [-DateOffset <Int32>] [-Tags <String[]>] [-Readme <String>] [-Date <DateTime>]
[-Location <String>] [<CommonParameters>]
Creates a new markdown-based journal entry with the provided tags and readme value, and opens it for writing using the default editor for .md
files. If an entry already exists for the specified date, you will be prompted to open it for further editing. In this case, the provided tags and readme value are discarded.
New-JournalEntry -Tags work,running,exciting-day
Creates a new journal entry for today, tagged running
, work
, and exciting-day
.
New-JournalEntry -DateOffset -1
Creates a new journal entry for yesterday.
A specific date for which to create a new journal entry. You can use a string representation of a date, such as '2019.12.20'
, or create a date using, for example,Get-Date -Day 10
which replaces the Day
element from current date with 10
. If today is January 22, 2020, Get-Date -Day 10
would return January 10, 2020.
Type: DateTime
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
An integer representing the number of days to offset from today's date. For example, -1 represents yesterday. The default is 0, meaning today.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The root directory for the journal to search for entries. This is only required if no default journal location has been set, or to search a non-default location.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
A date expressed as a string, or a duration of time from the date of the journal entry, when the journal entry should be re-read.
Date Expressions
Date expressions are parsed using .NET's DateTime.Parse() method which can successfully handle any common culture-specific formats. Examples valid for United States English include:
- 11/8/2019
- 11/8/19
- 11.8.2019
- 11-8-2019
- Friday November 8, 2019
Duration Expressions
Valid durations are expressed as an integer, followed by a single space, followed by one of the following periods:
- day(s)
- week(s)
- month(s)
- year(s)
Valid examples include:
- "1 year"
- "36 weeks"
- "1024 days"
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
An array of strings to apply to the entry as tags. Multiword tags should not have spaces. Instead, separate words by dashes or underscores.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.