Sephiroth
http://sephiroth.scifi-action.de/board/

Current Day
http://sephiroth.scifi-action.de/board/viewtopic.php?f=4&t=106
Seite 1 von 1

Autor:  Sephiroth [ 16. Juli 2009 13:58 ]
Betreff des Beitrags:  Current Day

; Returns the current day of the date given
alias ttt {
  ;a check for $date
  if (/ isin $1) { tokenize 32 $date($ctime($1),dd.mm.yyyy) }
  ;another check if it's a date that could be used with this method
  if ($ctime($1)) {
    !var %d,%y,%c,%m
    %d = 31+28+31+30+31+30+31+31+30+31+30
    %y = $iif($date($ctime($1),dd.mm.yyyy) == $1,$1,$date(dd.mm.yyyy))
    %c = $ctime(%y)
    %m = $calc($date(%c,m) -1)
    %d = $iif(%m != 0,$gettok(%d,1- $+ %m,43),0)
    return $calc($(%d,2) + $date(%c,dd) $iif(($ctime(29/02/ $+ $date(%c,yyyy))) && (%m > 1),+1))
  }
}

Seite 1 von 1 Alle Zeiten sind UTC + 1 Stunde
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/