Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

FAQ 4.14 How can I compare two dates and find the difference?

0 views
Skip to first unread message

PerlFAQ Server

unread,
May 12, 2008, 3:03:01 AM5/12/08
to
This is an excerpt from the latest version perlfaq4.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

--------------------------------------------------------------------

4.14: How can I compare two dates and find the difference?

(contributed by brian d foy)

You could just store all your dates as a number and then subtract. Life
isn't always that simple though. If you want to work with formatted
dates, the "Date::Manip", "Date::Calc", or "DateTime" modules can help
you.

--------------------------------------------------------------------

The perlfaq-workers, a group of volunteers, maintain the perlfaq. They
are not necessarily experts in every domain where Perl might show up,
so please include as much information as possible and relevant in any
corrections. The perlfaq-workers also don't have access to every
operating system or platform, so please include relevant details for
corrections to examples that do not work on particular platforms.
Working code is greatly appreciated.

If you'd like to help maintain the perlfaq, see the details in
perlfaq.pod.

Philluminati

unread,
May 12, 2008, 5:41:43 AM5/12/08
to

Honestly, what is the point of posting this? It really doesn't help.
It makes the newsgroup harder to read and they are never relevant.
It's basically spam. If the person doesn't google the question before
posting then they sure as hell aren't going to search the group. So
unless the correct answer to the question is on the groups active
discussion page, it really is a waste of space and bandwidth.

RedGrittyBrick

unread,
May 12, 2008, 6:40:06 AM5/12/08
to
Philluminati wrote:
> On May 12, 8:03 am, PerlFAQ Server <br...@stonehenge.com> wrote:
>>
>> These postings aim to
>> reduce the number of repeated questions as well as allow the community
>> to review and update the answers. The latest version of the complete
>> perlfaq is athttp://faq.perl.org.
>
> Honestly, what is the point of posting this?

I may be wrong but I think the point is described in the part you quoted.


> It makes the newsgroup harder to read ...

Have you considered using a newsreader instead of Google Groups. Then
you can kill postings with subjects that start "FAQ ".

--
RGB

Philluminati

unread,
May 12, 2008, 8:24:39 AM5/12/08
to
On May 12, 11:40 am, RedGrittyBrick <RedGrittyBr...@SpamWeary.foo>
wrote:

It doesn't matter what reader I use. It is useless junk that is a
waste of bandwidth. End of story.

A. Sinan Unur

unread,
May 12, 2008, 8:42:07 AM5/12/08
to
Philluminati <Phillip.R...@gmail.com> wrote in
news:75eda6f3-346e-4439...@24g2000hsh.googlegroups.com:

> On May 12, 8:03 am, PerlFAQ Server <br...@stonehenge.com> wrote:
>> This is an excerpt from the latest version perlfaq4.pod, which
>> comes with the standard Perl distribution. These postings aim to
>> reduce the number of repeated questions as well as allow the
>> community to review and update the answers. The latest version of the
>> complete perlfaq is athttp://faq.perl.org.
>>

...



> Honestly, what is the point of posting this?

Advertising the FAQ list.

> It really doesn't help.

These postings work in many ways. First, by making specific FAQ entries
more visible to inexperienced users. Second, FAQ entries are constantly
improved using feedback from the group.

> It makes the newsgroup harder to read

No they don't. Certainly, no more than newbies who post without reading
the documentation.

> and they are never relevant.

Huh? They are answers to Perl FAQ list.

> It's basically spam.

You need to learn what spam means.

> If the person doesn't google the question before
> posting then they sure as hell aren't going to search the group.

While I pride myself in reading the full FAQ list every time I upgrade
Perl, I cannot keep it all in my head all the time. These postings have
time and again attracted my attention to useful FAQ entries I had
forgotten. They also serve as an automatic review mechanism meaning that
the quality of the FAQ list increases as a direct result.

So, clueless newbies are not the only potential beneficiaries of these
postings.

Now, please do yourself and us a solid and please refrain from further
troll-like behavior.

Sinan

--
A. Sinan Unur <1u...@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/

Jürgen Exner

unread,
May 12, 2008, 9:34:07 AM5/12/08
to
Philluminati <Phillip.R...@gmail.com> wrote:
>On May 12, 8:03 am, PerlFAQ Server <br...@stonehenge.com> wrote:
[An FAQ entry]

>
>Honestly, what is the point of posting this? It really doesn't help.

I disagree. In addition to those reasons mentioned in the frist few
lines of each FAQ posting (which are very valid) they also raise
awareness for newcomers about the existance of a large FAQ collection.
Plus it is a nice regular refresher for oldtimers, too.

>It makes the newsgroup harder to read and they are never relevant.

If you personally don't like them it is easy enough to filter them,
either by sender or by "FAQ" at the beginning of the title. That's why
they have a fixed sender and title format.

>It's basically spam. If the person doesn't google the question before
>posting then they sure as hell aren't going to search the group.

No, they won't. And nobody would expect them to, either.
But because 2 FAQ entries are posted daily they will see numerous of
those postings before writing to the NG and hopefully get the idea to
check the FAQ for their problem first.

>unless the correct answer to the question is on the groups active
>discussion page,

What do you mean by "active discussion page"?

> it really is a waste of space and bandwidth.

IMO its a good use of space and bandwith.

jue

Ben Bullock

unread,
May 12, 2008, 9:35:51 AM5/12/08
to
On Mon, 12 May 2008 02:41:43 -0700, Philluminati wrote:

> Honestly, what is the point of posting this? It really doesn't help.

I find the FAQ posts quite helpful. It is a reminder of the contents for
everyone, and also a chance to check and keep the FAQ information up to
date.

> It
> makes the newsgroup harder to read and they are never relevant.

Actually they are often relevant. There are often questions asked here
(such as the recent thread from today) which are in the Perl FAQ.

> It's basically spam.

That's exaggeration.

> If the person doesn't google the question before posting
> then they sure as hell aren't going to search the group.

Perhaps we can hope for improvement though. If it isn't worth trying to
educate people, then why even bother with the newsgroup?

> So unless the
> correct answer to the question is on the groups active discussion page,
> it really is a waste of space and bandwidth.

Space and bandwidth are quite cheap these days. One five minute Youtube
video probably uses more space and bandwidth than a year of the Perl FAQ.

Sherman Pendley

unread,
May 12, 2008, 12:35:44 PM5/12/08
to
Philluminati <Phillip.R...@gmail.com> writes:

> It doesn't matter what reader I use. It is useless junk that is a
> waste of bandwidth. End of story.

You're welcome to your opinion, but really should get over yourself - it's
just your opinion, not the "end of story." You're nobody special.

Many of us were here when the FAQ began to be posted, and witnessed first-
hand the reduction in the number of redundant questions that resulted. You'll
have a difficult time convincing people who used to see the same question
asked six times a day in pre-FAQ days, that auto-posting it is a waste.

sherm--

--
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net

szr

unread,
May 12, 2008, 12:54:22 PM5/12/08
to
Philluminati wrote:
> On May 12, 8:03 am, PerlFAQ Server <br...@stonehenge.com> wrote:
[...]

>> These postings aim to reduce the number of repeated questions
>> as well as allow the community to review and update the answers.
[...]

> Honestly, what is the point of posting this?

You quoted the answer to your own question. If you don't want to read
them (which would be your loss), then skip and move on to what you
prefer to read.

--
szr


Marc Bissonnette

unread,
May 12, 2008, 7:09:36 PM5/12/08
to
"A. Sinan Unur" <1u...@llenroc.ude.invalid> fell face-first on the
keyboard. This was the result:
news:Xns9A9C5884D27B...@127.0.0.1:

Agreed wholeheartedly. While I consider myself a moderately experienced
perl geek, I'm far, far away from a true expert. More often than not,
the FAQ postings will trigger something of interest or simply refresh
knowledge that got a little stale. Many a time, I've read the odd FAQ
posting and thought "So *that's* how it's done", simply because it
wasn't important enough in the past to look up, but now makes future
coding easier because of the new knowledge.


--
Marc Bissonnette
Looking for a new ISP? http://www.canadianisp.com
Largest ISP comparison site across Canada.

David Combs

unread,
Jun 8, 2008, 4:49:29 PM6/8/08
to
In article <m1prrra...@dot-app.org>,

Not only that, having these things pop up once in a while
gives us all a chance to (re)visit them, and perhaps IMPROVE
them, make them more educational, tutorial, and UP TO DATE

(like if some new perl-feature provides eg an easier way
to attack the same problem -- the faq would be hopefully be
changed to show BOTH techniques.)

In my opinion, these revisit-possibilities contribute a LOT
to the Perl community.

David


David Combs

unread,
Jun 8, 2008, 4:55:47 PM6/8/08
to

And I repeat an earlier comment -- GET YOURSELF A DECENT NEWSREADER,
and with it FOREVER CONSIGN these faq-posts to your own bit-bucket.

Just because YOU don't like something doesn't mean that YOU get
to deprive everyone else of it!


And about "decent newsreaders", the said delete-these-subjects
features are DESIGNED for use by people precicely like you --
so GET ONE AND USE IT, and your life here on clpm will be
far happier.


David


szr

unread,
Jun 9, 2008, 1:00:24 AM6/9/08
to

I think you meant to reply to Philluminati, and not me?

--
szr


0 new messages