Write-SpectreCalendar
Description
Writes a Spectre Console Calendar text to the console.
Examples
Example 1
This example demonstrates how to write a calendar to the console.
Write-SpectreCalendar -Date 2024-07-01 -Events @{'2024-07-10' = 'Beach time!'; '2024-07-20' = 'Barbecue' }
Example 2
This example demonstrates how to write a calendar to the console with some event details.
$events = @{
'2024-01-10' = 'Hello World!'
'2024-01-20' = 'Hello Universe!'
}
Write-SpectreCalendar -Date 2024-01-01 -Events $events
Parameters
Date
The date to display the calendar for.
Type | Required | Position | PipelineInput |
---|---|---|---|
[DateTime] | false | 1 | false |
Alignment
The alignment of the calendar.
Valid Values:
- Left
- Right
- Center
Type | Required | Position | PipelineInput |
---|---|---|---|
[String] | false | 2 | false |
Color
The color of the calendar.
Type | Required | Position | PipelineInput |
---|---|---|---|
[Color] | false | 3 | false |
Border
The border of the calendar.
Valid Values:
- Ascii
- Ascii2
- AsciiDoubleHead
- Double
- DoubleEdge
- Heavy
- HeavyEdge
- HeavyHead
- Horizontal
- Markdown
- Minimal
- MinimalDoubleHead
- MinimalHeavyHead
- None
- Rounded
- Simple
- SimpleHeavy
- Square
Type | Required | Position | PipelineInput |
---|---|---|---|
[String] | false | 4 | false |
Culture
The culture of the calendar.
Type | Required | Position | PipelineInput |
---|---|---|---|
[CultureInfo] | false | 5 | false |
Events
The events to highlight on the calendar. Takes a hashtable with the date as the key and the event as the value.
Type | Required | Position | PipelineInput |
---|---|---|---|
[Hashtable] | false | 6 | false |
HideHeader
Hides the header of the calendar. (Date)
Type | Required | Position | PipelineInput |
---|---|---|---|
[Switch] | false | named | false |
PassThru
Returns the Spectre Calendar object instead of writing it to the console.
Type | Required | Position | PipelineInput |
---|---|---|---|
[Switch] | false | named | false |
Syntax
Write-SpectreCalendar [[-Date] <DateTime>] [[-Alignment] <String>] [[-Color] <Color>] [[-Border] <String>] [[-Culture] <CultureInfo>] [[-Events] <Hashtable>] [-HideHeader] [-PassThru] [<CommonParameters>]