Friday, July 04, 2008

An Amusing PowerShell Script

Many years ago, when Usenet was in it's heyday, there was a funny Perl script ( making the rounds that calculated which day it was from September 1992. It was an in joke, and amusing at the time - and I've been meaning to work out how to do it in PowerShell.

Well - here is is:

# time.ps1
# based in from Usenet in days gone by
# original author unknown
$old = [system.datetime]" 1 September 1992"
$diff = ($now-$old).days
"Today is the {0}th of September 1992" -f $diff

I thought it was funny - hope you do too.

Technorati: , ,

No comments: