The primary assumptions with many multi-period inventory lot-sizing models are fixed time horizon and uniform demand variation within each period. In some real inventory situations, however, the time horizon may be unknown, uncertain or imprecise in nature and the demand pattern may vary within a given replenishment period. This paper presents an economic order quantity model for deteriorating items where demand has different pattern with unknown time horizon. The model generates optimal replenishment schedules, order quantity and costs using a general ramp-type demand pattern that allows three-phase variation in demand. Shortages are allowed with full backlogging of demand and all possible replenishment scenarios that can be encountered when shortages and demand pattern variation occur in multi-period inventory modeling are also considered. With the aid of numerical illustrations, the advantages of allowing for variation in demand pattern within replenishment periods, whenever they occur, are explored. The numerical examples show that the length of the replenishment period generated by the model varies with the changes in demand patterns.