For UpdateDays, you can use the file_date function and compare the file date with the current date. That's what the assetHistory function internally does. This, and the code above, are almost the complete assetHistory function.