public
Fork of mojombo/chronic
Description: Chronic is a pure Ruby natural language date parser.
Homepage: http://chronic.rubyforge.org
Clone URL: git://github.com/technoweenie/chronic.git
timezone info in the readme
technoweenie (author)
Sat Mar 22 17:16:00 -0700 2008
commit  b593ed54d0196dd44d272d7f8b0c97c4e018142a
tree    8435dfbd66b263db33cef200ff1f4270f3618f66
parent  9979458a4c4e8010d3c3c84b616a28f128bc7f82
...
127
128
129
 
 
 
 
 
 
 
 
 
 
130
131
132
133
134
135
136
137
138
...
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
 
 
144
145
146
0
@@ -127,12 +127,20 @@ Specific Times (many of the above with an added time)
0
   1979-05-27 05:00:00
0
   etc
0
 
0
+== TIME ZONES:
0
+
0
+Chronic allows you to set which Time class to use when constructing times. By default, the built in Ruby time class creates times in your system's
0
+local time zone. You can set this to something like ActiveSupport's TimeZone class to get full time zone support.
0
+
0
+ >> Time.zone = "UTC"
0
+ >> Chronic.time_class = Time.zone
0
+ >> Chronic.parse("June 15 2006 at 5:45 AM")
0
+ => Thu, 15 Jun 2006 05:45:00 UTC +00:00
0
+
0
 == LIMITATIONS:
0
   
0
 Chronic uses Ruby's built in Time class for all time storage and computation. Because of this, only times that the Time class can handle will be properly parsed. Parsing for times outside of this range will simply return nil. Support for a wider range of times is planned for a future release.
0
 
0
-Time zones other than the local one are not currently supported. Support for other time zones is planned for a future release.
0
-
0
 == LICENSE:
0
 
0
 (The MIT License)

Comments

    No one has commented yet.