Files
PowerShell/test/powershell/Modules/Microsoft.PowerShell.Utility/assets/localized.ps1
T
James Truher 1e1c4b7dc0 Restructure of pester test layout
This restructuring moves tests to a directory name which matches the module
in which the cmdlet resides which should improve the discoverability of a
specific test.
For tests which are not about cmdlets in a module, new directories have been
created to make those tests easier to find as well
2016-06-29 12:05:41 -07:00

30 lines
680 B
PowerShell

# Sample code from https://technet.microsoft.com/en-us/library/hh847854.aspx
$Day = DATA {
# culture="en-US"
ConvertFrom-StringData @'
messageDate = Today is
d0 = Sunday
d1 = Monday
d2 = Tuesday
d3 = Wednesday
d4 = Thursday
d5 = Friday
d6 = Saturday
'@
}
Import-LocalizedData -BindingVariable Day
# Build an array of weekdays.
$a = $Day.d0, $Day.d1, $Day.d2, $Day.d3, $Day.d4, $Day.d5, $Day.d6
# Get the day of the week as a number (Monday = 1).
# Index into $a to get the name of the day.
# Use string formatting to build a sentence.
"{0} {1}" -f $Day.messageDate, $a[(get-date -uformat %u)] | Out-Host