Deprecated: str_replace(): Passing null to parameter #1 ($search) of type array|string is deprecated in /var/www/vhosts/gamedevstudiogame.com/httpdocs/classes/client.php on line 124

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /var/www/vhosts/gamedevstudiogame.com/httpdocs/classes/client.php on line 124
Game dev studio

Classes

Concepts

Libraries

advertisement »

ambientSounds »

bitser »

contentPoints »

eventBoxText »

factValidity »

frameBuffer »

officeBuildingInserter »

priorityRenderer »

randomEvents »

scaling »

spritesheetParser »

statusIcons »

test3 »

util »

Objects

getTimePeriodText

Description

Returns proper time period text for the specified time period.

Arguments

1 number time

the time value.

Returns

1 string

the text.

Example

timeline:getTimePeriodText(1) -- "1 day"

timeline:getTimePeriodText(3) -- "3 days"

timeline:getTimePeriodText(6) -- "1 week"

timeline:getTimePeriodText(10) -- "2 weeks"

timeline:getTimePeriodText(21) -- "1 month"

timeline:getTimePeriodText(60) -- "3 months"

timeline:getTimePeriodText(241) -- "1 year"

timeline:getTimePeriodText(480) -- "2 years"