couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Hahn <m...@hahnca.com>
Subject Re: confused about date parsing
Date Wed, 29 Jan 2014 22:54:52 GMT
It's not illegal, it's just something that would usually not make sense.
 The only use case I can think of is if you want a timestamp in a document
indicating when it was last put in the index.  Why one would need this is
beyond me, but it is certainly "legal".


On Wed, Jan 29, 2014 at 2:45 PM, Jens Alfke <jens@couchbase.com> wrote:

>
> On Jan 29, 2014, at 2:17 PM, Alexander Shorin <kxepal@gmail.com> wrote:
>
> > On Thu, Jan 30, 2014 at 2:13 AM, Dan Santner <dansantner@me.com> wrote:
> >>                                var today = new Date();
> >
> > This value will be computed only once when document get indexed, not
> > each time when you query the view.
>
> Has anyone thought of modifying the JS global bindings when a map function
> runs, such that calling Date.new will throw an exception? Preferably an
> exception with a descriptive message like "It is illegal to use the current
> date in a map function"? It would save considerable support time -- I
> believe this is the second time this issue has come up in the last week.
>
> (Yes, probably more appropriate on the dev list...)
>
> --Jens
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message