prosidius,
The proximal interphalangeal joint (PIPJ) of the fingers is very susceptible to many disorders.
It could be some type of arthritic condition, but it is unusual for it to only bother you a few weeks a year. But, it's possible.
Any minor trauma can cause quite a bit of problems in the PIPJ. They do not take being injured very well. The PIPJ can stay swollen for a long time, even after minor trauma.
The PIPJ of the small finger is also a place that if affected by clinodactyly and camptodactyly quite commonly. Both of these conditions can cause swelling and discomfort. But, usually their presenting problem is that of a curve or bend in the finger.
If the condition becomes persistent or is bothersome to you, you should have it evaluated by a hand surgeon.
Good luck.