From 31a60892ec8a3d34472024e6b08e78b6d018aa9e Mon Sep 17 00:00:00 2001 From: Lee Jarvis Date: Mon, 30 May 2011 21:34:56 +0100 Subject: [PATCH] added documentation for the :endian_precedence option --- lib/chronic/chronic.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/chronic/chronic.rb b/lib/chronic/chronic.rb index dd3ba87..c067324 100644 --- a/lib/chronic/chronic.rb +++ b/lib/chronic/chronic.rb @@ -47,6 +47,14 @@ class << self # assume that means 5:00pm. If :none is given, no assumption # will be made, and the first matching instance of that time will # be used. + # + # [:endian_precedence] + # Array (defaults to [:middle, :little]) + # + # By default, Chronic will parse "03/04/2011" as the fourth day + # of the third month. Alternatively you can tell Chronic to parse + # this as the third day of the fourth month by altering the + # :endian_precedence to [:little, :middle]. def parse(text, specified_options = {}) @text = text options = DEFAULT_OPTIONS.merge specified_options