~ubuntu-branches/ubuntu/lucid/libdatetime-format-natural-perl/lucid

« back to all changes in this revision

Viewing changes to README

  • Committer: Bazaar Package Importer
  • Author(s): Angel Abad
  • Date: 2010-01-14 00:04:58 UTC
  • mfrom: (1.2.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20100114000458-3ehfhsxbm39960yc
Tags: 0.83-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
         warn $parser->error;
23
23
     }
24
24
 
 
25
     @traces = $parser->trace;
 
26
 
25
27
DESCRIPTION
26
28
    `DateTime::Format::Natural' takes a string with a human readable
27
29
    date/time and creates a machine readable one by applying natural parsing
100
102
 
101
103
  trace
102
104
 
103
 
    Returns a trace of methods which were called within the Base class and a
104
 
    summary how often certain units have been modified.
 
105
    Returns one or more strings with traces of methods which were called
 
106
    within the Base class and a summary how often certain units have been
 
107
    modified. More than one string is commonly returned for durations.
105
108
 
106
109
GRAMMAR
107
110
    The grammar handling has been rewritten to be easily extendable and
115
118
    See the classes `DateTime::Format::Natural::Lang::[language_code]' for a
116
119
    overview of currently valid input.
117
120
 
 
121
BUGS & CAVEATS
 
122
    `parse_datetime()'/`parse_datetime_duration()' always return one or more
 
123
    DateTime objects regardless whether the parse was successful or not. In
 
124
    case no valid expression was found or a failure occurred, an unaltered
 
125
    DateTime object with its initial values (most often the "current" now)
 
126
    is likely to be returned. It is therefore recommended to use `success()'
 
127
    to assert that the parse did succeed (at least, for common uses),
 
128
    otherwise the absence of a parse failure cannot be guaranteed.
 
129
 
 
130
    `parse_datetime()' is not capable of handling durations.
 
131
 
118
132
CREDITS
119
133
    Thanks to Tatsuhiko Miyagawa for the initial inspiration. See Miyagawa's
120
134
    journal entry http://use.perl.org/~miyagawa/journal/31378 for more