Determining time since
http://search.cpan.org/search?query=datetime+ago&mode=all
DateTime::Format::Human::Duration
print $dt->format_duration_between( $dta, $dtb, 'past' => 'Your account expired %s ago.', 'future' => 'Your account expires in %s.', 'no_time'=> 'Your account just expired.', );
DateTime::Format::Natural::Lang::EN
6 in the morning 4 in the afternoon 9 in the evening 25 seconds ago 10 minutes ago 7 hours ago 40 days ago 2 weeks ago 5 months ago 3 years ago tomorrow 25 seconds ago tomorrow 10 minutes ago tomorrow 7 hours ago tomorrow 40 day ago tomorrow 2 weeks ago tomorrow 5 months ago tomorrow 3 years ago yesterday 25 seconds ago yesterday 10 minutes ago yesterday 7 hours ago yesterday 40 days ago yesterday 2 weeks ago yesterday 5 months ago yesterday 3 years ago fri 3 months ago at 5am wednesday 1 month ago at 8pm 8 hours before now 8 hours from now 7 days before now 7 days from now 4 weeks before now 4 weeks from now 13 months before now 13 months from now 2 years before now 2 years from now tuesday 4 in the morning thursday 2 in the afternoon monday 6 in the evening last sunday at 21:45 last week friday monday last week 2nd day last week 10th day last month tuesday next week 3rd day next month 10th month next year in 42 minutes in 3 hours in 5 days wednesday this week 3rd tuesday this november 3 hours before tomorrow 6 hours before yesterday 9 hours after tomorrow 12 hours after yesterday 3 hours before noon 6 hours after noon 9 hours before midnight 12 hours after midnight yesterday at noon yesterday at midnight today at noon today at midnight tomorrow at noon tomorrow at midnight yesterday at 16:00 today at 6:00 tomorrow at 12 wednesday at 14:30 2nd friday in august tomorrow 1 year ago saturday 3 months ago at 5:00pm 4th day last week 3rd wednesday in november 3rd month next year

In reply to Re: Showing the time difference in a natural format? by Anonymous Monk
in thread Showing the time difference in a natural format? by skx

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.