A battery is a chemical product which produces electricity by chemical reactions at its inside. These reactions and its inside materials do deteriorate over time. If you start using it within that period, the battery will operate normally and maintain the specified performance.
The capacity of batteries is indicated as XXXX mAh (milliampere/hour). If you insert this battery into an appliance which consumes 100 milliampere current continuously, the operating time of the appliance will be around 20 hours mathematically.
In appliances without a charging function, yes. In appliances that do have a charging function, be sure to check whether the function was specifically designed for Ni-MH. If not, it’s best not to use Ni-MH batteries.