Archive for the ‘Web Programming’ Category

Displaying a person’s age in PHP

Tuesday, November 13th, 2007

In case you’re looking for a quick function to display the age of someone based on their birthdate, you may come across this script.

Well, that doesn’t work. Here’s a correct way to return an age:

//calculate years of age (input string: YYYY-MM-DD)
function age_in_years($birthday){
  list($year,$month,$day) = explode("-",$birthday);
  $year_diff  = date("Y") - $year;
  $month_diff = date("m") - $month;
  $day_diff   = date("d") - $day;
  if (($month_diff < 0) || (($month_diff <= 0) && ($day_diff < 0)))
     $year_diff--;
  return $year_diff;
}

New web launch: The Lodge On Magnolia

Tuesday, September 4th, 2007

Today Small Box launched a website that I designed and developed myself. Check it out.

Lodge On Magnolia

The Lodge On Magnolia

new web launch: ClearMarket

Monday, August 20th, 2007

Today Small Box launched a new web site that I designed and developed. It’s for ClearMarket, a local direct mail marketing company.

ClearMarket

Small Box CMS - THREAD

Friday, April 20th, 2007

I created a fictional clothing store chain called THREAD in order to showcase their CMS functionality.

Check it out.

NewsLinkIndiana.com Launches

Saturday, April 22nd, 2006

NewslinkIndiana.com has now launched. I’m NLI’s web developer. For this project I was involved heavily in the design, and in charge of taking the design and turning it into standards compliant HTML, CSS, and Javascript. The websites uses several widgets I coded, including weather, poll, and XML feeds.