Date representation as YY/DDD or YYYY/DDD

Polytropon freebsd at edvax.de
Wed Jun 3 21:52:26 UTC 2009


On Wed, 3 Jun 2009 16:07:11 -0500, Kirk Strauser <kirk at strauser.com> wrote:
> Like this?
> 
> $ date +'%y/%j'
> 09/154
> $ date +'%Y/%j'
> 2009/154

Exactly. After re-reading "man strftime", I really found it
mentioned there:

     %j    is replaced by the day of the year as a decimal number (001-366).

Would be nice to have this in "man date", too. :-)




-- 
Polytropon
>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list