Date manipulation with yest

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:


$ gcc yest- -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

How many days are in a current month:

$ yest +0 %L

Show epoch time to current date:

$ yest +0 %s

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

$ yest +0 %q

Show my time zone:

$ yest %Z

Add 45 days to 28.12.1923

$ yest 1923-12-28 +45

Subtract 300 days from 28.12.1923:

$ yest 1923-12-28 -300

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