API:FormatTimeExpires

Aus WARWiki

Keine Beschreibung verfügbar.

Nutzung

API:FormatTimeExpires()


Diese Funktion übernimmt keine Argumente.


Diese Funktion gibt keine Werte zurück.


Source Code

function FormatTimeExpires(timeInSeconds)
	if timeInSeconds < (600 ) then	-- 60*10 = 600
		return GetStringFormatFromTable( "MailStrings", StringTables.Mail.TEXT_MAIL_EXPIRES_LESSTHAN_X_MINS, {L"<", L""..10})
	end	

	if timeInSeconds < (3600) then	-- 60*60 = 3600
		return GetStringFormatFromTable( "MailStrings", StringTables.Mail.TEXT_MAIL_EXPIRES_LESSTHAN_X_HOUR, {L"<",  L""..1})
	end	

	if timeInSeconds < (86400) then	-- 60*60*24 = 86400
		return GetStringFormatFromTable( "MailStrings", StringTables.Mail.TEXT_MAIL_EXPIRES_LESSTHAN_X_DAY, {L"<",  L""..1})
	end	
	
	timeInSeconds = math.floor((timeInSeconds-1) / 86400)
	return GetStringFormatFromTable( "MailStrings", StringTables.Mail.TEXT_MAIL_EXPIRES_LESSTHAN_X_DAYS, {L""..timeInSeconds} )
end


Persönliche Werkzeuge
Anzeige

Sponsoren