Skip to content

Commit

Permalink
see changelog for v1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jdhitsolutions committed Mar 15, 2019
1 parent 0566c47 commit d7149cf
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 8 deletions.
18 changes: 14 additions & 4 deletions PSCalendar.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
RootModule = 'PSCalendar.psm1'

# Version number of this module.
ModuleVersion = '1.5.1'
ModuleVersion = '1.6'

# Supported PSEditions
CompatiblePSEditions = @("Desktop","Core")
Expand All @@ -22,7 +22,7 @@ Author = 'Jeff Hicks'
CompanyName = 'JDH Information Technology Solutions, Inc.'

# Copyright statement for this module
Copyright = '(c) 2018-19 Jeff Hicks. All rights reserved.'
Copyright = '(c) 2018-19 JDH Information Technology Solutions, Inc. All rights reserved.'

# Description of the functionality provided by this module
Description = 'A PowerShell module to display a calendar in the console.'
Expand Down Expand Up @@ -64,7 +64,12 @@ PowerShellVersion = '5.1'
# NestedModules = @()

# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = 'Get-Calendar','Show-Calendar','Show-GuiCalendar'
FunctionsToExport= If ($PSedition -eq 'Core') {
'Get-Calendar', 'Show-Calendar'
}
else {
'Get-Calendar', 'Show-Calendar', 'Show-GuiCalendar'
}

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = ''
Expand All @@ -73,7 +78,12 @@ CmdletsToExport = ''
VariablesToExport = ''

# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = 'cal','scal','gcal'
AliasesToExport = if ($PSEdition -eq 'Core') {
'cal', 'scal'
}
else {
'cal', 'scal', 'gcal'
}

# DSC resources to export from this module
# DscResourcesToExport = @()
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# PSCalendar

This module contains a few functions for displaying a calendar in the PowerShell console. The primary function is based on code originally published by Lee Holmes at http://www.leeholmes.com/blog/2008/12/03/showing-calendars-in-your-oof-messages/
[![PSGallery Version](https://img.shields.io/powershellgallery/v/PSCalendar.png?style=for-the-badge&logo=powershell&label=PowerShell%20Gallery)](https://www.powershellgallery.com/packages/PSCalendar/) [![PSGallery Downloads](https://img.shields.io/powershellgallery/dt/PSCalendar.png?style=for-the-badge&label=Downloads)](https://www.powershellgallery.com/packages/PSCalendar/)

This module contains a few functions for displaying a calendar in the PowerShell console. The primary function is based on code originally published by Lee Holmes at [http://www.leeholmes.com/blog/2008/12/03/showing-calendars-in-your-oof-messages/](http://www.leeholmes.com/blog/2008/12/03/showing-calendars-in-your-oof-messages/)
.

You can install this module from the PowerShell Gallery.
Expand Down Expand Up @@ -55,4 +57,4 @@ PS C:\> Show-GuiCalendar 12/2018 2/2019 -highlight 12/24/18,12/25/18,12/31/18,1/

The calendar form is transparent. But you should be able to click on it to drag it around your screen. You can also use the + and - keys to increase or decrease the calendar's opacity. Be aware that if you close the PowerShell session that launched the calendar, the calendar too will close. This function requires Windows PowerShell.

*last updated 30 January 2019*
_last updated 15 March 2019_
5 changes: 3 additions & 2 deletions calendar-functions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ Function Get-Calendar {
#Convert the highlight dates into real dates
#using the .NET Class to parse because this works better for culture-specific datetime strings
[DateTime[]]$highlightDates = foreach ($item in $highlightDate) {
[datetime]::parse($item)
#parse datetime using current culture
$cult = Get-Culture
[datetime]::parse($item,$cult)
}
#Retrieve the DateTimeFormat information so that we can manipulate the calendar
$dateTimeFormat = (Get-Culture).DateTimeFormat
Expand Down Expand Up @@ -117,7 +119,6 @@ Function Get-Calendar {
$displayDay = "*" + ("{0,2}" -f $currentDay.Day) + "*"
}


#Add in the day of week and day number as note properties.
$currentWeek | Add-Member NoteProperty $dayName $displayDay

Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log for PSCalendar

## v1.6.0

+ Fixing date parsing bug for different cultures (Issue #9)
+ Manifest updates to better accommodate PowerShell Core and Windows PowerShell
+ Updated `README.md`

## v1.5.1

+ Modified `Show-Calendar` to use a different highlight color for today.
Expand Down

0 comments on commit d7149cf

Please sign in to comment.