Determining time since
http://search.cpan.org/search?query=datetime+ago&mode=all
DateTime::Format::Human::Durationprint $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
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|