BlackTDN Search

quinta-feira, 15 de dezembro de 2011

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

Um comentário:

  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