last command

Is there a way to display the month day and year of the last logins. I'm working on a script to check how long it has been since the last login but run into a problem when the login was last year.

What kind of problems?
What have you written so far with your script?
What is the output you are getting, and how do you recognize the 'problem'?

Without knowing what commands you are using, it is difficult to assist you in your problem.

basically I convert todays date into a number and then take the month and day portion of the last command and convert that into a number then subtract the the number from the last command from the current date number. My problem is if the last login was dec of last year I get a negitive number. I have a script that will do date math but it requires a year to be entered. The output of the last command only gives month and day.

#!/bin/ksh
time=`lsuser -f -a time_last_login user_name | grep time | cut -d= -f2`
perl -le "print scalar localtime $time"

Probably it's more convenient way. But it works.