2005-02-17

For you armchair accountants keeping score at home...

...there are now 57 days left to file your federal income taxes. Or apply for an extension, if that's how you make the days go by.

I like to refer to a handy tool I found on the MSHWiki that Monad Architect Jeffrey Snover wrote called "DaysTill".

The DaysTill script he provided is a little rough around the edges. I punched it up just a smidge and now it looks like this:

MSH>cat daystill.msh
$local:usage = 
"usage: daystill date1 [date2] [date3] ...
  date1 - a date of the format MM/DD/YYYY"

function daystill ([DateTime]$then) 
{ 
  $then.Subtract([DateTime].Now.Date).Days
}

if ($args.Length -lt 1)
{
  return ($usage)
}

foreach ($local:arg in $args)
{
  daystill $arg
}

MSH>

Usage is very straightfoward. Today, for example, I get this:

MSH>./daystill 4/15/2005
57
MSH>

It's that easy, folks.

No comments: