All pastes #277209 Raw Edit

Lol Time

public javascript v1 · immutable
·published 2006-12-13 00:30 UTC
rendered paste body
<script type="text/javascript"><!--function GetElapsedTime ( intime ){    var timeunit = 1165969713 - intime;    if (timeunit < 0) timeunit = 0;    if ( timeunit < 60 ) return timeunit + ' seconds ago';    timeunit = Math.floor( timeunit / 60 );    if ( timeunit < 60 )    {        if ( timeunit == 1 ) return timeunit + ' minute ago';        return timeunit + ' minutes ago';    }    timeunit = Math.floor( timeunit / 60 );    if ( timeunit < 48 )    {        if ( timeunit == 1 ) return timeunit + ' hour ago';        return timeunit + ' hours ago';    }    timeunit = Math.floor( timeunit / 24 );	if (timeunit == 1) return timeunit + ' day ago';    return timeunit + ' days ago';}function GetFutureTime ( intime ){    var timeunit = intime - 1165969713;    if (timeunit < 0) timeunit = 0;    if ( timeunit < 60 ) return timeunit + ' seconds';    timeunit = Math.ceil( timeunit / 60 );    if ( timeunit < 60 )    {        if ( timeunit == 1 ) return timeunit + ' minute';        return timeunit + ' minutes';    }    timeunit = Math.ceil( timeunit / 60 );    if ( timeunit < 48 )    {        if ( timeunit == 1 ) return timeunit + ' hour';        return timeunit + ' hours';    }    timeunit = Math.ceil( timeunit / 24 );	if (timeunit == 1) return timeunit + ' day';    return timeunit + ' days';}function PrintTimeTill( num ){  if ( num == 0 ){ document.write( "Forever" );}else{ document.write( GetFutureTime(num) );}}//--></script>