From owner-freebsd-questions@FreeBSD.ORG Wed Jun 3 21:03:21 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7F3D1065672 for ; Wed, 3 Jun 2009 21:03:21 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id A97188FC14 for ; Wed, 3 Jun 2009 21:03:21 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r55.edvax.de (port-92-195-65-8.dynamic.qsc.de [92.195.65.8]) by mx01.qsc.de (Postfix) with ESMTP id 9D5533CB2A for ; Wed, 3 Jun 2009 23:03:20 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id n53L3FaB002682 for ; Wed, 3 Jun 2009 23:03:15 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Wed, 3 Jun 2009 23:03:14 +0200 From: Polytropon To: FreeBSD Questions Message-Id: <20090603230314.bfeecf1a.freebsd@edvax.de> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Date representation as YY/DDD or YYYY/DDD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2009 21:03:22 -0000 I'm looking to an existing way to output a date in the format YY/DDD, where YY is the year (last two digits) and DDD is the of the year, starting from 1, preceeded by zeroes if needed, and YYYY/DDD, where YYYY is the year with four digits, such as 2009-01-01 would be 09/001, 2009-02-01 would be 2009/032. I've read "man date" and "man strftime", and it didn't look like this is already built in. What am I missing? If it's not invented yet, I'll do this on my own, but maybe I don't need to re-invent the wheel. :-) -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...