added method for date calculation