403Webshell
Server IP : 51.89.169.208  /  Your IP : 216.73.216.126
Web Server : Apache
System : Linux ns3209505.ip-198-244-202.eu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Tue Nov 5 04:50:16 EST 2024 x86_64
User : yellowleaf ( 1019)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/zsh/5.5.1/functions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/zsh/5.5.1/functions/calendar_showdate
emulate -L zsh
setopt extendedglob
zmodload -i zsh/datetime

local optm datefmt opt
integer optr replyset

zstyle -s ':datetime:calendar_showdate:' date-format datefmt ||
  datefmt="%a %b %d %H:%M:%S %Z %Y"

# Memo to myself: both + and - are documented as giving relative
# times, so it's not a good idea to rewrite this to use getopts.
# We need to detect the small number of options this can actually
# handle.
while [[ $1 = -r || $1 = -- || $1 = -f* ]]; do
  case $1 in
    (-r)
    shift
    REPLY=0
    optr=1
    ;;

    (-f*)
    if [[ $1 = -f?* ]]; then
      datefmt=$1[3,-1]
      shift
    else
      shift
      if [[ -z $1 || $1 != *%* ]]; then
	print "$0: -f requires a date/time specification" >&2
	return 1
      fi
      datefmt=$1
      shift
    fi
    ;;

    (--)
    shift
    break
    ;;
  esac
done

(( optr )) || local REPLY

if (( ! $# )); then
  print "Usage: $0 datespec [ ... ]" >&2
  return 1
fi

while (( $# )); do
  optm=
  if [[ $1 = [-+]* ]]; then
    # relative
    [[ $1 = -* ]] && optm=-m
    1=${1[2,-1]}
    # if this is the first argument, use current time
    # don't make assumptions about type of reply in case global
    if (( ! replyset )); then
      REPLY=$EPOCHSECONDS
      replyset=1
    fi
  fi

  if (( replyset )); then
    calendar_scandate $optm -R $REPLY -aA $1 || return 1
    replyset=1
  else
    calendar_scandate -aA $1 || return 1
  fi

  shift
done

(( optr )) && return
strftime $datefmt $REPLY

Youez - 2016 - github.com/yon3zu
LinuXploit