hours : { mon : { open : 10 , close : 20 } , .. }
would work well
then you can query like
db.foo.find( { "hours.mon.open" : { $gt : (current hour) } ,
"hours.mon.close" : { $lt : (current_hour) } } )
this is a problem if something is open from noon till 2 am though
another options is something like
{ hours : { mon : [ false , false , true true ] } }
so you can say
db.foo.find( { "mon.20" : true } )
can make it more granular than an hour if you want
> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>
>