date.month == 2 && date.mday == 29 && Date.leap?(date.year)
DateTime.new(2013,4,16) # self.hire_date - Should be a db field, just for temporarily messing around
DateTime.now # maybe should change to DateTime.new(DateTime.now.year, DateTime.now.month, DateTime.now.mday ) to get rid of the timestamp since most places don't care about what hour of the day it is
DateTime.new(current_date.year, 12, -1).yday()
# If leap day, change calculated startding day to the 28th since DateTime doesn't support invalid dates.
# I prefer not to outright subtract since it's not as deliberate and can be an issue if everything is not properly typecast
# Include the day started as a full day, consider current_date a full day
# The leap day adding logic is not quite complete though. What if the current_date is a leap day, etc.?
year_point = current_date.year - hire_date.year
start_date = leap_day(hire_date) ? DateTime.new(hire_date.year, 2, 28) : hire_date # I like recasting the hire day as start_date because then we don't worry about seconds, etc., but should really be addressed in hire_date and start_date
adder_date = DateTime.new(start_date.year + year_point, start_date.month, start_date.mday)
if (adder_date != current_date)
(year_point + (current_date.yday() - adder_date.yday() + 1).to_f/total_days_current_year.to_f).to_f