BOM - Set Expiry of Finished Product from Components?

Is this possible?

Can ERPNext use the expiry dates from the components of a BOM, and set the expiry date of the finished product from the nearest expiry date of the compnents?

For example:
You make a paint that normally has a shelf life of 2 years.
However one of your components has an expiry date of 1 year, so therefore the expiry date of the paint cannot exceed this limitation. Therefore this batch would have a 1 year expiry date instead of 2 years.