You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -236,6 +236,16 @@ You need to include the escape character but you do not need to include the clos
236
236
237
237
This change lasts for the duration of your PowerShell session. If you want to make it more permanent, you will need to add the commands to your PowerShell profile script.
238
238
239
+
## ANSI Support
240
+
241
+
As you've seen, there are several commands in this module that rely on ANSI for formatting. The hosting application needs to be able to recognize and use ANSI escape sequences. These commands should work in both Windows PowerShell and PowerShell 7 in the traditional PowerShell consoles or in Windows Terminal. They will not work in the PowerShell ISE. ANSI-related output will be automatically disabled if the PowerShell ISE is detected.
242
+
243
+
If you aren't sure if your host supports ANSI, run `Get-PSReadlineOption`. You should see something like this:
If you don't see color formatting, the hosting application doesn't support ANSI.
248
+
239
249
## A Note on Culture
240
250
241
251
I've tried very hard to make the commands respect culture. Most commands now that string values to represent dates which are then treated as dates internally. For this reason, it is important that you follow the culture-specific short date format that you get from running this command:
Copy file name to clipboardExpand all lines: changelog.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,21 @@
1
1
# Change Log for PSCalendar
2
2
3
+
## v2.8.0
4
+
5
+
+ Updated `Get-Calendar` and `Show-Calendar` with a new parameter `MonthOnly` to only show days from the specified month. This will remove leading and trailing days from other months. [Issue #29](https://github.com/jdhitsolutions/PSCalendar/issues/29). Much thanks to [Matthew Gray](https://github.com/scriptingstudio) for the suggestions and code snippet.
6
+
+ Updated `Get-Calendar`, `Show-Calendar`, and `Get-NCalendar` to suppress all ANSI formatting when running in the PowerShell ISE. [Issue #30](https://github.com/jdhitsolutions/PSCalendar/issues/30)
7
+
+ Moved `Show-PSCalendarHelp` to a separate file under Functions.
8
+
+ Documentation updates.
9
+
+ Updated `README.md`.
10
+
+ Help updates.
11
+
12
+
## v2.7.0
13
+
14
+
+ Updates to `Get-NCalendar`[Issue #25](https://github.com/jdhitsolutions/PSCalendar/issues/25). Much thanks to [atkinsroy](https://github.com/atkinsroy) for excellent suggestions and code examples.
15
+
+ Restructured module layout.
16
+
+ Updated Pester tests.
17
+
+ Help updates.
18
+
3
19
## v2.6.0
4
20
5
21
+ Updates to `Get-NCalendar`[Issue #25](https://github.com/jdhitsolutions/PSCalendar/issues/25).
In Windows PowerShell, all of the commands appear to respect culture settings. However, when running in PowerShell 7 there appears to be a bug in .NET Core and how it returns culture information for some cultures, specifically the first day of the week. If you run `Get-Calendar` or `Show-Calendar` and the week begins on the wrong day, use the `FirstDay` parameter to override the detected .NET values with the correct one. If you are running under the en-AU culture in PowerShell 7, you would need to run this command.
Do not use any ANSI formatting. The output will be plain-text. This also means that the current day and highlight dates will not be reflected in the output.
231
+
Do not use any ANSI formatting. The output will be plain-text. This also means that the current day and highlight dates will not be reflected in the output. This parameter has no affect when running the command in the PowerShell ISE. There is no color formatting when using this host.
232
+
233
+
```yaml
234
+
Type: SwitchParameter
235
+
Parameter Sets: (All)
236
+
Aliases:
237
+
238
+
Required: False
239
+
Position: Named
240
+
Default value: None
241
+
Accept pipeline input: False
242
+
Accept wildcard characters: False
243
+
```
244
+
245
+
### -MonthOnly
246
+
247
+
Do not show any leading or trailing days from other months.
214
248
215
249
```yaml
216
250
Type: SwitchParameter
@@ -224,7 +258,7 @@ Accept pipeline input: False
224
258
Accept wildcard characters: False
225
259
```
226
260
227
-
### CommonParameters
261
+
### CommonParameters.
228
262
229
263
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
This command generates equivalent output to the ncal Linux command. This is not a 100% port of that command but it should provide similar results for the same month and year. You should enter the complete month name. There should be tab-completion for the month and year values. This command has an alias of ncal on Windows platforms.
23
23
24
+
If you run this command in the PowerShell ISE, there will be no highlighting or ANSI formatting.
Display the calendar at a specified X,Y position in the console. This parameter will probably not work in the PowerShell ISE.
49
49
50
+
### Example 4
51
+
52
+
```powershell
53
+
PS C:\> Show-Calendar -Month January -Year 2022 -MonthOnly
54
+
55
+
January 2022
56
+
57
+
Sun Mon Tue Wed Thu Fri Sat
58
+
1
59
+
2 3 4 5 6 7 8
60
+
9 10 11 12 13 14 15
61
+
16 17 18 19 20 21 22
62
+
23 24 25 26 27 28 29
63
+
30 31
64
+
```
65
+
66
+
Suppress leading and trailing days from other months with the MonthOnly parameter.
67
+
50
68
## PARAMETERS
51
69
52
70
### -Month
@@ -129,7 +147,24 @@ Accept pipeline input: False
129
147
Accept wildcard characters: False
130
148
```
131
149
150
+
### -MonthOnly
151
+
152
+
Do not show any leading or trailing days.
153
+
154
+
```yaml
155
+
Type: SwitchParameter
156
+
Parameter Sets: (All)
157
+
Aliases:
158
+
159
+
Required: False
160
+
Position: Named
161
+
Default value: None
162
+
Accept pipeline input: False
163
+
Accept wildcard characters: False
164
+
```
165
+
132
166
### CommonParameters
167
+
133
168
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
0 commit comments