🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.perl
Article #51820

Re: Obliczanie daty.

#51820
From: A.L.E.C
Date: Wed, 10 Mar 2010 08:07
14 lines
1219 bytes
Paweł Matejski wrote:
> Witam.
> 
> Potrzebuję w perlu znaleźć datę: pierwszy dzień zeszłego miesiąca. Jak to zrobić jakoś prosto?

i jeszcze tak (plus formatowanie daty):

perl -e 'use POSIX; print strftime("%Y-%m-%d", 
localtime(mktime(0,0,0,1,(localtime)[4]-1,(localtime)[5])));'

-- 
Aleksander 'A.L.E.C' Machniak http://alec.pl gg:2275252
LAN Management System Developer http://lms.org.pl
Roundcube Webmail Developer http://roundcube.net
Technical Details
Message-ID: <hn7k10$oo$1@news.onet.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!not-for-mail
References: <67li67-1o8.ln1@nixxie.mibm>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!not-for-mail
From: "A.L.E.C" <alec1@poczta.onet.pl>
Newsgroups: pl.comp.lang.perl
Subject: Re: Obliczanie daty.
Date: Wed, 10 Mar 2010 09:07:59 +0100
Organization: http://onet.pl
Lines: 14
Message-ID: <hn7k10$oo$1@news.onet.pl>
References: <67li67-1o8.ln1@nixxie.mibm>
NNTP-Posting-Host: alec.altec.pl
Mime-Version: 1.0
X-Trace: news.onet.pl 1268208480 792 194.150.197.210 (10 Mar 2010 08:08:00 GMT)
X-Complaints-To: niusy@onet.pl
NNTP-Posting-Date: Wed, 10 Mar 2010 08:08:00 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.23 (X11/20090817)
In-Reply-To: <67li67-1o8.ln1@nixxie.mibm>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit