<div dir="ltr">@sleepyfox, you (or someone else above?) are correct that this ordering is probably only a presentational concern.<br><br>Since you asked, the stories might be something like this: (though please let's not get into a critique of how best to express user stories).<br><br>Background: <br>* Event curators manage a collection of other people's events<br>* Some events are one-offs, some are recurring but intermittent, others repeat regularly (e.g. monthly)<br>* Regularly repeating events are unreliable: not guaranteed to happen in the same week every month, and may not happen at all some months.<div>* Future dates often aren't published until quite close to the event.<br><br>Stories:<br><br>AS AN event curator <div>SO THAT I can judge how likely it is that a future date for a recurring event has been published</div><div>I WANT to see the next expected date of recurring events<br>Detail: <br>* For regularly recurring events this can be set automatically</div><div>* For intermittent events this can be set manually, but otherwise may be missing<br><br>AS AN event curator<br>SO THAT I can prioritise the events for which I need to confirm future dates<br>I WANT to see a daily report of events which have no future dates <br>Detail:<br>* This event list should be ordered by expected_date (i.e. next expected first, which is priority order)</div><div>* Events with no expected_date should be considered highest priority </div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 18 July 2015 at 11:54, Sleepyfox <span dir="ltr"><<a href="mailto:sleepyfox@gmail.com" target="_blank">sleepyfox@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thinking out loud:<br>
<br>
Another use of NullDate with sorting might be to place them 'now', as<br>
if they are placed at the beginning (of time) or end then they may<br>
never get seen by the user.<br>
<br>
On the other hand, placing them in a totally separate piece of the UI<br>
may be a better course of action, in which case null dates should be<br>
filtered and never appear in the sorted chronological view.<br>
<br>
I'm guessing that there are requirements that are not being expressed<br>
here: why is it that some events do not have a date? Is it that they<br>
are ongoing or repeating events? Or is it that they are awaiting<br>
scheduling? The business meaning behind not having a date will dictate<br>
how you wish to deal with them.<br>
<br>
Personally I would feel uncomfortable mixing in 'date-less events'<br>
with the general 'date-ful' events; whenever I see something like this<br>
there is generally a more elegant (domain) solution that makes all the<br>
complexity go away...<br>
<br>
Fox<br>
--<br>
"What does the @sleepyfox say?"<br>
<span class=""><br>
<br>
On 17 July 2015 at 14:18, Andrew Premdas <<a href="mailto:apremdas@gmail.com">apremdas@gmail.com</a>> wrote:<br>
> The use of a NullDate is not incompatible with something wanting to sort<br>
> Events in a particular way. If we think about how NullDate's should be<br>
> sorted we can see a very limited number of possibilities<br>
><br>
> - place at the end<br>
> - place at the beggining<br>
><br>
> So our NullDate could support a convention when implementing comparable to<br>
> make one of these choices and perhaps allow configuration to choose the<br>
> other. This would allow Events (and lots of other stuff) to use NullDates,<br>
> and allow Event collections to control how Date's effect the ordering.<br>
><br>
> I wonder should this functionality actually be in Date?<br>
><br>
</span><span class="">> On 17 July 2015 at 11:51, James Mead <<a href="mailto:james@floehopper.org">james@floehopper.org</a>> wrote:<br>
>><br>
>> I just came across the undocumented Date::Infinity class [1] which<br>
>> might be of some relevance to this thread.<br>
>><br>
>> [1]:<br>
>> <a href="https://github.com/ruby/ruby/blob/c8b3f1b470e343e7408ab5883f046b1056d94ccc/ext/date/lib/date.rb#L7..L58" rel="noreferrer" target="_blank">https://github.com/ruby/ruby/blob/c8b3f1b470e343e7408ab5883f046b1056d94ccc/ext/date/lib/date.rb#L7..L58</a><br>
>><br>
</span>>> On 17 July 2015 at 00:53, Paul Makepeace <<a href="mailto:paulm@paulm.com">paulm@paulm.com</a>> wrote:<br>
<span class="">>> > On Thu, Jul 16, 2015 at 3:24 PM, Stephen Best <<a href="mailto:bestie@gmail.com">bestie@gmail.com</a>> wrote:<br>
>> >><br>
>> >> events.sort_by { |e|<br>
>> >> e.date { heat_death_of_the_universe }<br>
>> >> }<br>
>> >><br>
>> ><br>
>> > This to me is the clearest of the proposals (Tom's role idea is cool<br>
>> > too).<br>
>> ><br>
>> > For a null object you could also use... nil<br>
>> ><br>
>> > events.sort_by { |e|<br>
>> > e.date || date_that_sorts_at_the_end # (named to be clearer about<br>
>> > intent)<br>
>> > }<br>
>> ><br>
>> > The whole discussion has been really interesting!<br>
>> ><br>
>> > Paul<br>
>> > _______________________________________________<br>
>> > Chat mailing list<br>
</span>>> > <a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
>> > Archives: <a href="http://lists.lrug.org/pipermail/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/pipermail/chat-lrug.org</a><br>
<span class="">>> > Manage your subscription:<br>
>> > <a href="http://lists.lrug.org/options.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/options.cgi/chat-lrug.org</a><br>
</span>>> > List info: <a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
>> _______________________________________________<br>
>> Chat mailing list<br>
>> <a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
>> Archives: <a href="http://lists.lrug.org/pipermail/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/pipermail/chat-lrug.org</a><br>
<span class="">>> Manage your subscription: <a href="http://lists.lrug.org/options.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/options.cgi/chat-lrug.org</a><br>
</span>>> List info: <a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
><br>
><br>
><br>
><br>
> --<br>
> ------------------------<br>
> Andrew Premdas<br>
> <a href="http://blog.andrew.premdas.org" rel="noreferrer" target="_blank">blog.andrew.premdas.org</a><br>
<span class="">><br>
> _______________________________________________<br>
> Chat mailing list<br>
> <a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
</span>> Archives: <a href="http://lists.lrug.org/pipermail/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/pipermail/chat-lrug.org</a><br>
<span class="">> Manage your subscription: <a href="http://lists.lrug.org/options.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/options.cgi/chat-lrug.org</a><br>
</span>> List info: <a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
><br>
_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
Archives: <a href="http://lists.lrug.org/pipermail/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/pipermail/chat-lrug.org</a><br>
<span class="">Manage your subscription: <a href="http://lists.lrug.org/options.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/options.cgi/chat-lrug.org</a><br>
</span>List info: <a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
</blockquote></div><br></div>