Class Horde_Date_Parser_Locale_Pt
- Horde_Date_Parser_Locale_Base
- Horde_Date_Parser_Locale_Pt
Located at Horde/Date/Parser/Locale/Pt.php
public
|
|
public
|
#
parse( mixed $text, mixed $specifiedOptions = array() )
Parses a string containing a natural language date or time. If the parsercan find a date or time, either a Horde_Date or Horde_Date_Span will be returned(depending on the value of :return). If no date or time can be found,+nil+ will be returned.# Options are:# [:context]:past or :future (defaults to :future)# If your string represents a birthday, you can set :context to :pastand if an ambiguous string is given, it will assume it is in thepast. Specify :future or omit to set a future context.# [:now]Time (defaults to time())# By setting :now to a Horde_Date, all computations will be based offof that time instead of time().# [:return]'result', 'span', or 'date' (defaults to 'date')# By default, the parser will guess a single point in time for thegiven date or time. If you'd rather have the entire time span returned,set :return to 'span' and a Horde_Date_Span will be returned.If you want the entire result, including tokens (for retrieving the textthat was or was not tagged, for example), set :return to 'result'and you will get a result object.# [:ambiguousTimeRange]Integer or :none (defaults to 6 (6am-6pm))# If an Integer is given, ambiguous times (like 5:00) will beassumed to be within the range of that time in the AM to that timein the PM. For example, if you set it to 7, then the parser willlook for the time between 7am and 7pm. In the case of 5:00, it wouldassume that means 5:00pm. If :none is given, no assumptionwill be made, and the first matching instance of that time willbe used. |
public
|
#
normalize_special_characters( mixed $str )
Replaces special characters with non-special equivalents source: http://pt2.php.net/manual/en/function.chr.php#93291 |
public
|
#
preNormalize( mixed $text )
Clean up the specified input text by stripping unwanted characters,converting idioms to their canonical form, converting number wordsto numbers (three => 3), and converting ordinal words to numericordinals (third => 3rd) |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
public
array
|
$definitions
|
#
array()
|
public
array
|
$args
|
#
array()
|
public
mixed
|
$now
|