PowerShell :: NaldosNextBirthday

Function NaldosNextBirthday(){
  $Now = [DateTime]::Now
  [Datetime]([string] ($now.Year + 1) + "-12-15T00:00:00") – $Now
}
While ( $True ){
    NaldosNextBirthday;
    Start-Sleep -Seconds 1
    cls
}   

image

Function NaldosNextBirthday(){
  $Now = [DateTime]::Now
  [Datetime]([string] ($now.Year + 1) + "-12-15T00:00:00") – $Now
}
While ( $True ){
    NaldosNextBirthday;
    Start-Sleep -Milliseconds 100
    cls
}   

image

Function NaldosNextBirthday(){
  $Now          = [DateTime]::Now
  $ZeroDay    = ( [Datetime]([string] ($now.Year + 1) + "-12-15T00:00:00") – $Now )
  if ( $ZeroDay.Day -eq 0 ){
    Write-Host -ForegroundColor Yellow -BackgroundColor Black "Naldo";
    Write-Host -ForegroundColor Yellow -BackgroundColor Black "";
    Write-Host -ForegroundColor Yellow -BackgroundColor Black "Feliz Aniversário!";
    Write-Host -ForegroundColor Yellow -BackgroundColor Black "happy birthday!";
    Write-Host -ForegroundColor Yellow -BackgroundColor Black "feliz cumpleaños!";
    Write-Host -ForegroundColor Yellow -BackgroundColor Black "dies natalis!";
    Write-Host -ForegroundColor Yellow -BackgroundColor Black "";
    Write-Host -ForegroundColor Yellow -BackgroundColor Black "(...)";
    Write-Host -ForegroundColor Yellow -BackgroundColor Black "";
    Write-Host -ForegroundColor Yellow -BackgroundColor Black ":)";
  }else{
      Write-Host -NoNewline -ForegroundColor Cyan -BackgroundColor Black "Days till Naldo's birthday: " $ZeroDay;
  }
}
While ( $True ){
    NaldosNextBirthday;
    Start-Sleep -Milliseconds 10
    cls
}

image

image

Baseado no original: PowerShell: How Many Days Till New Year

[]s

иαldσ dj

Comentários

  1. Parabéns ae mano, muitos anos de vida e conhecimento, continue compartilhando a experiencia...

    ..se baseando aqui http://naldodjblogs.blogspot.com/search/label/Thomas%20Jefferson

    ResponderExcluir

Postar um comentário

Postagens mais visitadas