Helper alias $now

By Ayon on May 20, 2009

I know this isn't much, but it is very helpfull, at least I think it is :) The syntax is really easy...

just do $now(type,<1-4>)[.o]

the o prop is optional and used to insert the oo in the date.

types = day,month,year

the N is how you want to display the result.

$now(day,2) = 21
$now(day,2).o = 21st
$now(month,3) = May

and so on :)

alias now {
  if ($1 == day) { return $iif($2 isnum,$asctime($ctime,$str(d,$v1) $+ $iif($prop, $iif($prop == o,oo)))) }
  elseif ($1 == month) { return $iif($2 isnum,$asctime($ctime,$str(m,$v1))) }
  elseif ($1 == year) { return $iif($2 isnum,$asctime($ctime,$str(y,$v1))) }


Sign in to comment.
Jonesy44   -  May 24, 2009

Not sure if i really am getting the point of this...

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.