Historical age
Function Syntax
float historical_age(item shop_for )
- shop_for for which to check the price's age
Returns the age of the price that historical_price() will return. The return value is in days, so a returned value of 1.25 means that the price is 1 day and 6 hours old.
Code Samples
Returns a price no more than 18 hours old by checking mall_price() if the historical_price() is older than that.
int check_price(item shopfor) {
if(historical_age(shopfor) > .75)
return mall_price(shopfor);
return historical_price(shopfor);
}