FAQ 4.14 How can I compare two dates and find the difference?
  Home FAQ Contact Sign in
comp.lang.perl.misc only
 
Advanced search
POPULAR GROUPS

more...

comp.lang.perl.misc Profile…
 Up
FAQ 4.14 How can I compare two dates and find the difference?         


Author: PerlFAQ Server
Date: May 12, 2008 00:03

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.

--------------------------------------------------------------------
Show full article (1.30Kb)
12 Comments
Re: FAQ 4.14 How can I compare two dates and find the difference?         


Author: Philluminati
Date: May 12, 2008 02:41

On May 12, 8:03 am, PerlFAQ Server 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.
>
> --------------------------------------------------------------------
>
> 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.
>
> --------------------------------------------------------------------
> ...
Show full article (1.81Kb)
no comments
Re: FAQ 4.14 How can I compare two dates and find the difference?         


Author: RedGrittyBrick
Date: May 12, 2008 03:40

Philluminati wrote:
> On May 12, 8:03 am, PerlFAQ Server 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
no comments
Re: FAQ 4.14 How can I compare two dates and find the difference?         


Author: Philluminati
Date: May 12, 2008 05:24

On May 12, 11:40 am, RedGrittyBrick
wrote:
> Philluminati wrote:
>> On May 12, 8:03 am, PerlFAQ Server 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 ".
>
> -- ...
Show full article (0.81Kb)
no comments
Re: FAQ 4.14 How can I compare two dates and find the difference?         


Author: A. Sinan Unur
Date: May 12, 2008 05:42

Philluminati gmail.com> wrote in
news:75eda6f3-346e-4439-b96d-683a1c10adba@24g2000hsh.googlegroups.com:
> On May 12, 8:03 am, PerlFAQ Server 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.
Show full article (1.92Kb)
no comments
Re: FAQ 4.14 How can I compare two dates and find the difference?         


Author: Jürgen Exner
Date: May 12, 2008 06:34

Philluminati gmail.com> wrote:
>On May 12, 8:03 am, PerlFAQ Server 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.
Show full article (1.32Kb)
no comments
Re: FAQ 4.14 How can I compare two dates and find the difference?         


Author: Ben Bullock
Date: May 12, 2008 06:35

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.
Show full article (1.08Kb)
no comments
Re: FAQ 4.14 How can I compare two dates and find the difference?         


Author: Sherman Pendley
Date: May 12, 2008 09:35

Philluminati 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.

sher
--

--
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net
no comments
Re: FAQ 4.14 How can I compare two dates and find the difference?         


Author: szr
Date: May 12, 2008 09:54

Philluminati wrote:
> On May 12, 8:03 am, PerlFAQ Server 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
no comments
Re: FAQ 4.14 How can I compare two dates and find the difference?         


Date: May 12, 2008 16:09

"A. Sinan Unur" <1usa@llenroc.ude.invalid> fell face-first on the
keyboard. This was the result:
news:Xns9A9C5884D27BFasu1cornelledu@127.0.0.1:
> Philluminati gmail.com> wrote in
> news:75eda6f3-346e-4439-b96d-683a1c10adba@24g2000hsh.googlegroups.com:
>
>> On May 12, 8:03 am, PerlFAQ Server stonehenge.com> wrote:
...
Show full article (2.42Kb)
no comments
 
1 2