yest is a great tool which allows user to do some complex date manipulations by employing ab easy to understand syntax. It is not a competitor to a date command, rather it is a handy tool which has some features you may not find in date command. Name of the yest command is derived from its default no argument output which is yesterday’s date.

You can download a latest version of yest from SourceForge:
https://sourceforge.net/projects/yest/files/yest/2.7.0.4/yest-2.7.0.4.c/download

Compile:

$ gcc yest-2.7.0.4.c -o yest

and add it to your path:

# cp yest /usr/local/bin

Here are some examples of yest usage:

What day was on 6.8.1938

$ yest 1938-08-06 +0 %A
Saturday

How many days are in a current month:

$ yest +0 %L
31

Show epoch time to current date:

$ yest +0 %s
1301044056

Is daylight savings time active?, 1-yes 0-no:

$ yest +0 %q
1

Show my time zone:

$ yest %Z
EST

Add 45 days to 28.12.1923

$ yest 1923-12-28 +45
11/02/1924

Subtract 300 days from 28.12.1923:

$ yest 1923-12-28 -300
03/03/1923

Show date 1000 days back:

$ yest -1000d %f
Saturday, June 28th, 2008 - 07:39:49 pm

Show date 1000 hours in the future from now:

$ yest +1000h %f
Friday, May 6th, 2011 - 11:41:32 am

Show usage:

$ yest --help

Free Linux eBooks

Do you have the right skills?

Our IT Skills Watch page reflects an up to date IT skills demand leaning towards the Linux and Unix environment. We have considered a number of skills and operating systems.

See the result...

Linux Online Training

Learn to run Linux servers and prepare for LPI certification with Linux Academy. 104 available video lessons with PDF course notes with your own server!

Go to top