NAME
DateTime::Format::Natural::Lang::EN - English language metadata
DESCRIPTION
"DateTime::Format::Natural::Lang::EN" provides the english specific grammar and variables. This class is loaded if the user either specifies the english language or implicitly.
EXAMPLES
Below are some examples of natural language date/time input in english (be aware that the parser does usually not distinguish between lower/upper case; furthermore, many expressions allow for additional leading/trailing time and all times are also parsable with precision in (milli)seconds):
Simple
nowyesterdaytodaytomorrowmorningafternooneveningnoonmidnightyesterday at noonyesterday at midnighttoday at noontoday at midnighttomorrow at noontomorrow at midnightthis morningthis afternoonthis eveningyesterday morningyesterday afternoonyesterday eveningtoday morningtoday afternoontoday eveningtomorrow morningtomorrow afternoontomorrow eveningthursday morningthursday afternoonthursday evening6:00 yesterday6:00 today6:00 tomorrow5am yesterday5am today5am tomorrow4pm yesterday4pm today4pm tomorrowlast millisecondthis millisecondnext millisecondlast secondthis secondnext secondlast minutethis minutenext minutelast hourthis hournext hourlast daythis daynext daylast weekthis weeknext weeklast monththis monthnext monthlast quarterthis quarternext quarterlast yearthis yearnext yearlast fridaythis fridaynext fridaytuesday last weektuesday this weektuesday next weeklast week wednesdaythis week wednesdaynext week wednesday10 milliseconds ago10 seconds ago10 minutes ago10 hours ago10 days ago10 weeks ago10 months ago10 years agoin 5 millisecondsin 5 secondsin 5 minutesin 5 hoursin 5 daysin 5 weeksin 5 monthsin 5 yearssaturdaysunday 11:00yesterday at 4:00today at 4:00tomorrow at 4:00yesterday at 6:45amtoday at 6:45amtomorrow at 6:45amyesterday at 6:45pmtoday at 6:45pmtomorrow at 6:45pmyesterday at 2:32 AMtoday at 2:32 AMtomorrow at 2:32 AMyesterday at 2:32 PMtoday at 2:32 PMtomorrow at 2:32 PMyesterday 02:32today 02:32tomorrow 02:32yesterday 2:32amtoday 2:32amtomorrow 2:32amyesterday 2:32pmtoday 2:32pmtomorrow 2:32pmwednesday at 14:30wednesday at 02:30amwednesday at 02:30pmwednesday 14:30wednesday 02:30amwednesday 02:30pmfriday 03:00 amfriday 03:00 pmsunday at 05:00 amsunday at 05:00 pm2nd monday100th day4th februarynovember 3rdlast junenext october6 am5am5:30am8 pm4pm4:20pm06:56:06 am06:56:06 pmmon 2:351:00 sun1am sun1pm sun1:00 on sun1am on sun1pm on sun12:14 PM12:14 AM
Complex
yesterday 7 milliseconds agoyesterday 7 seconds agoyesterday 7 minutes agoyesterday 7 hours agoyesterday 7 days agoyesterday 7 weeks agoyesterday 7 months agoyesterday 7 years agotoday 5 milliseconds agotoday 5 seconds agotoday 5 minutes agotoday 5 hours agotoday 5 days agotoday 5 weeks agotoday 5 months agotoday 5 years agotomorrow 3 milliseconds agotomorrow 3 seconds agotomorrow 3 minutes agotomorrow 3 hours agotomorrow 3 days agotomorrow 3 weeks agotomorrow 3 months agotomorrow 3 years ago2 milliseconds before now2 seconds before now2 minutes before now2 hours before now2 days before now2 weeks before now2 months before now2 years before now4 milliseconds from now4 seconds from now4 minutes from now4 hours from now4 days from now4 weeks from now4 months from now4 years from now6 in the morning4 in the afternoon9 in the eveningmonday 6 in the morningmonday 4 in the afternoonmonday 9 in the eveninglast sunday at 21:45monday last week6th day last week6th day this week6th day next week12th day last month12th day this month12th day next month1st day last year1st day this year1st day next year1st tuesday last november1st tuesday this november1st tuesday next november11 january next year11 january this year11 january last year6 milliseconds before yesterday6 seconds before yesterday6 minutes before yesterday6 hours before yesterday6 milliseconds before today6 seconds before today6 minutes before today6 hours before today6 milliseconds before tomorrow6 seconds before tomorrow6 minutes before tomorrow6 hours before tomorrow3 milliseconds after yesterday3 seconds after yesterday3 minutes after yesterday3 hours after yesterday3 milliseconds after today3 seconds after today3 minutes after today3 hours after today3 milliseconds after tomorrow3 seconds after tomorrow3 minutes after tomorrow3 hours after tomorrow10 milliseconds before noon10 seconds before noon10 minutes before noon10 hours before noon10 milliseconds before midnight10 seconds before midnight10 minutes before midnight10 hours before midnight5 milliseconds after noon5 seconds after noon5 minutes after noon5 hours after noon5 milliseconds after midnight5 seconds after midnight5 minutes after midnight5 hours after midnightnoon last fridaymidnight last fridaynoon this fridaymidnight this fridaynoon next fridaymidnight next fridaylast friday at 20:00this friday at 20:00next friday at 20:001:00 last friday1:00 this friday1:00 next friday1am last friday1am this friday1am next friday1pm last friday1pm this friday1pm next friday5 am last monday5 am this monday5 am next monday5 pm last monday5 pm this monday5 pm next mondaylast wednesday 7amthis wednesday 7amnext wednesday 7amlast wednesday 7pmthis wednesday 7pmnext wednesday 7pmlast tuesday 11 amthis tuesday 11 amnext tuesday 11 amlast tuesday 11 pmthis tuesday 11 pmnext tuesday 11 pmyesterday at 13:00today at 13:00tomorrow at 132nd friday in august3rd wednesday in novembertomorrow 1 year agosaturday 3 months ago at 17:00saturday 3 months ago at 5:00amsaturday 3 months ago at 5:00pm11 january 2 years ago4th day last week8th month last year8th month this year8th month next year6 mondays from nowfri 3 months ago at 5amwednesday 1 month ago at 8pmfinal thursday in aprillast thursday in aprilbeginning of last monthend of last month
Timespans
monday to friday1 April to 31 August1999-12-31 to tomorrownow to 2010-01-012009-03-10 9:00 to 11:0026 oct 10:00 am to 11:00 amjan 1 to 216:00 nov 6 to 17:00may 2nd to 5th100th day to 200th6am dec 5 to 7am30th to 31st dec30th to dec 31st21:00 to mar 3 22:0021:00 to 22:00 mar 310th to 20th day1/3 to 2/32/3 to in 1 week3/3 21:00 to in 5 daysfirst day of 2009 to last day of 2009first day of may to last day of mayfirst to last day of 2008first to last day of septemberfor 4 millisecondsfor 4 secondsfor 4 minutesfor 4 hoursfor 4 daysfor 4 weeksfor 4 monthsfor 4 years
Specific
marchjanuary 1111 january18 oct 17:0018 oct 5am18 oct 5pm18 oct 5 am18 oct 5 pmdec 25feb 28 3:00feb 28 3amfeb 28 3pmfeb 28 3 amfeb 28 3 pm19:00 jul 17am jul 17pm jul 17 am jul 17 pm jul 1jan 24, 2011 12:00jan 24, 2011 12amjan 24, 2011 12pmmay 27th2005march 1st 2009October 2006february 14, 2004jan 3 20103 jan 20002010 october 282011-jan-0427/5/19791/31/3 16:003/13/1 16:004:0017:003:20:00-5min+2d201110180000002016-06-19T12:12:11
Aliases
1 msec ago4 msecs ago1 sec ago10 secs ago1 min ago5 mins ago1 hr ago3 hrs ago1 yr ago7 yrs agoyesterday @ noontues this weekfinal thurs in septuesthursthur
SEE ALSO
DateTime::Format::Natural
AUTHOR
Steven Schubiger <[email protected]>
LICENSE
This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.
See <http://dev.perl.org/licenses/>