🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Obliczanie daty.

#51821
From: Paweł Matejski
Date: Wed, 10 Mar 2010 14:38
16 lines
1324 bytes
A.L.E.C wrote:
> 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])));'

A to mnie zaskoczyło, że tak działa. Ale pasuje mi to rozwiązanie w sumie. :)

-- 
P.M.
Technical Details
Message-ID: <dfnk67-h85.ln1@nixxie.mibm>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
References: <67li67-1o8.ln1@nixxie.mibm> <hn7k10$oo$1@news.onet.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
From: Paweł Matejski <madej@nospam.madej.pl.eu.org>
Newsgroups: pl.comp.lang.perl
Subject: Re: Obliczanie daty.
Date: Wed, 10 Mar 2010 15:38:05 +0100
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 16
Message-ID: <dfnk67-h85.ln1@nixxie.mibm>
References: <67li67-1o8.ln1@nixxie.mibm> <hn7k10$oo$1@news.onet.pl>
NNTP-Posting-Host: fw.polonia.com.pl
Mime-Version: 1.0
X-Trace: inews.gazeta.pl 1268232364 11811 81.21.202.2 (10 Mar 2010 14:46:04 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Wed, 10 Mar 2010 14:46:04 +0000 (UTC)
X-User: madejp
In-Reply-To: <hn7k10$oo$1@news.onet.pl>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.9) Gecko/20080110 Thunderbird/2.0.0.9 Mnenhy/0.7.4.666
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit