Last year, one of my co-workers gave me a yellow tomato. It was hard, and still it is hard. It has not dried nor turned mushy. What type of tomato is this? The size is about 2 inches in diameter.
there 12000 varieties of tomato 500 may be yellow varieties there is no way to tell from your description.
If it lasted as long as you say it could well be what's called a keeping variety, they ripen very slowly and in geneneral have lousy tastes with a few exceptions.
I've linked to a list of longkeeper varieties below from Tania's excellent tomato data base so you can see how many there are.
But with no information given to you I think, actually know, that it will be impossible to ID it.
The only one on her list that I've grown, is the one under the Z category, which is also known as Giraffe.
Hope that helps.
Here is a link that might be useful: Longkeeper varieties