Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] [PATCH] chronic parsing for 'today'
@ 2007-11-22  6:35 Grant Hollingworth
  2007-11-23 22:50 ` William Morgan
  0 siblings, 1 reply; 2+ messages in thread
From: Grant Hollingworth @ 2007-11-22  6:35 UTC (permalink / raw)


It turns out Chronic.parse has a poorly documented option of :context => :none.

By default, Chronic uses :context => :future, so 'today' means the rest of today. This also applies to 'this day' (which is what Chronic normalizes 'today' to), 'this week', 'this month', etc.  

With :context => :none, 'today' means all of today. I think it's safe to use for all searches.

This feature has been around for at least a year -- Chronic 0.1.6 is the earliest gem I have, and it works.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sup-chronic-today.diff
Type: application/octet-stream
Size: 607 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20071121/4657fc5d/attachment-0001.obj 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [sup-talk] [PATCH] chronic parsing for 'today'
  2007-11-22  6:35 [sup-talk] [PATCH] chronic parsing for 'today' Grant Hollingworth
@ 2007-11-23 22:50 ` William Morgan
  0 siblings, 0 replies; 2+ messages in thread
From: William Morgan @ 2007-11-23 22:50 UTC (permalink / raw)


Excerpts from Grant Hollingworth's message of Wed Nov 21 22:35:34 -0800 2007:
> With :context => :none, 'today' means all of today. I think it's safe
> to use for all searches.

Applied, thanks!

-- 
William <wmorgan-sup at masanjin.net>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-23 22:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-22  6:35 [sup-talk] [PATCH] chronic parsing for 'today' Grant Hollingworth
2007-11-23 22:50 ` William Morgan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox