Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,45 @@
function Convert-PriceFraction
{
[CmdletBinding()]
[OutputType([double])]
Param
(
[Parameter(Mandatory=$true,
ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true,
Position=0)]
[ValidateScript({$_ -ge 0.0 -and $_ -le 1.0})]
[double]
$InputObject
)
Process
{
foreach ($fraction in $InputObject)
{
switch ($fraction)
{
{$_ -lt 0.06} {0.10; break}
{$_ -lt 0.11} {0.18; break}
{$_ -lt 0.16} {0.26; break}
{$_ -lt 0.21} {0.32; break}
{$_ -lt 0.26} {0.38; break}
{$_ -lt 0.31} {0.44; break}
{$_ -lt 0.36} {0.50; break}
{$_ -lt 0.41} {0.54; break}
{$_ -lt 0.46} {0.58; break}
{$_ -lt 0.51} {0.62; break}
{$_ -lt 0.56} {0.66; break}
{$_ -lt 0.61} {0.70; break}
{$_ -lt 0.66} {0.74; break}
{$_ -lt 0.71} {0.78; break}
{$_ -lt 0.76} {0.82; break}
{$_ -lt 0.81} {0.86; break}
{$_ -lt 0.86} {0.90; break}
{$_ -lt 0.91} {0.94; break}
{$_ -lt 0.96} {0.98; break}
Default {1.00}
}
}
}
}

View file

@ -0,0 +1 @@
.7388727, .8593103, .826687, .3444635, .0491907 | Convert-PriceFraction | ForEach-Object {"{0:C}" -f $_}