How can I get the last 2 digits of:
200912
to my object:
$year = $flightDates-&
// first two
$year = substr($flightDates->departureDate->year, 0, 2);
// last two
$year = substr($flightDates->departureDate->year, -2);
But given the fact that you're parsing a date here it would be smarter to use the date function.
p.e. strtotime() and date() or even:
format('Y');
// prints "2012" .. (see date formats)