🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.javascript
Article #39148

Re: data, porównanie

#39148
From: Vax
Date: Fri, 24 Mar 2006 18:53
14 lines
1316 bytes
Użytkownik "Łucio" <lucioj@skasuj.poczta.onet.pl> napisał:
>>
>> Jak zrobia porównanie dwóch dat (String) postaci YYYY-MM-DD
>> if (data1>data2) {...}else{...}
>
> Zrób sobie z daty liczbę:
> data = YYYY*100000000 + MM*10000 + DD*100
>
> Tak samo dla drugiej daty, teraz łatwo je porównać.

noooo... bo stringi to sie tak trudno porownuja ;D

v. 
Technical Details
Message-ID: <e01f2p$2q18$1@news2.ipartners.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!newsfeed.pionier.net.pl!news.ipartners.pl!ipartners.pl!not-for-mail
References: <dvpfig$mn3$1@atlantis.news.tpi.pl> <op.s6xk3snq5imkg7@hp>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!newsfeed.pionier.net.pl!news.ipartners.pl!ipartners.pl!not-for-mail
From: "Vax" <taki.ego@wa.la>
Newsgroups: pl.comp.lang.javascript
Subject: Re: data, porównanie
Date: Fri, 24 Mar 2006 19:53:38 +0100
Organization: Internet Partners
Lines: 16
Message-ID: <e01f2p$2q18$1@news2.ipartners.pl>
References: <dvpfig$mn3$1@atlantis.news.tpi.pl> <op.s6xk3snq5imkg7@hp>
NNTP-Posting-Host: 217.153.196.41
X-Trace: news2.ipartners.pl 1143226265 92200 217.153.196.41 (24 Mar 2006 18:51:05 GMT)
X-Complaints-To: abuse@ipartners.pl
NNTP-Posting-Date: 24 Mar 2006 18:51:05 GMT
X-RFC2646: Format=Flowed; Response
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MSMail-Priority: Normal
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit