# Auto-bump a topic if its title contains today's date

**URL:** https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197
**Category:** Feature
**Tags:** auto-bump
**Created:** [5 mei 2017 om 21:10 UTC](https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197 "2017-05-05T21:10:29Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![ChrisBeach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisbeach/32/214628_2.png) [@ChrisBeach](https://meta.discourse.org/u/ChrisBeach)
#### Post date: [5 mei 2017 om 21:10 UTC](https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197/1 "2017-05-05T21:10:30Z")

</div>

On my forum, people post local events weeks or months in advance of the date.

Unfortunately, on the day of the event, the associated post is often long-buried.

It would be handy if Discourse could:

- Identify dates automatically in post titles (as Apple apps do).
- Automatically bump posts on their identified date
- Show dates neatly and consistently on the topic list:  
 ![](https://global.discourse-cdn.com/meta/original/3X/e/a/ea0619af0aef04da4d00fa9d9f73adeb8c1102fd.png)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [5 mei 2017 om 21:21 UTC](https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197/2 "2017-05-05T21:21:34Z")

</div>

Oh, that’s a neat idea! A nifty form of very lightweight scheduling. I wonder if it could be abused though?

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [5 mei 2017 om 21:34 UTC](https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197/3 "2017-05-05T21:34:02Z")

</div>

I like this idea - we also have a category on our forum for events, and this kind of interface would be ideal!

I think if it was enabled per-category, and there was only one date (or date range) associated with a topic, then the potential for abuse is fairly minimal?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [5 mei 2017 om 22:04 UTC](https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197/4 "2017-05-05T22:04:47Z")

</div>

I think the title would have to include the year? Or maybe just bump if the day and month are in the future, for the current year the topic was created in only?

---

<div class="post-metadata">

### Author: ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)
#### Post date: [5 mei 2017 om 22:09 UTC](https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197/5 "2017-05-05T22:09:38Z")

</div>

> [@codinghorror](#):
>
> for the current year the topic was created in only?

for a 12 months range from created date, to make it work into the following year.

---

<div class="post-metadata">

### Author: ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)
#### Post date: [6 mei 2017 om 11:29 UTC](https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197/6 "2017-05-06T11:29:40Z")

</div>

> [@david](#):
>
> I think if it was enabled per-category, and there was only one date (or date range) associated with a topic, then the potential for abuse is fairly minimal?

I think this is a nice case for

> [@How do we decide what goes into each release of Discourse?](https://meta.discourse.org/t/how-do-we-decide-what-goes-into-each-release-of-discourse/20870/1):
>
> we try to avoid having too much discussion in favor of Just Trying Something.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [8 mei 2017 om 14:29 UTC](https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197/7 "2017-05-08T14:29:28Z")

</div>

The challenge I see here is around parsing,

“11th Feb” vs  
“11/2” vs  
“2/11” (cause USA) vs  
“11-02” vs  
“Feb 11” vs  
“Feb 11, 2017” vs  
“Feb 2 - Come to the maker fair”  
“Come to the maker fair - Feb 2”

It is a solvable problem but there is a lot of magic that would need to be added.

I think the first step here would be to build a plugin for it.

I am not that concerned about abuse cause you could simply ban abusers from posting in the category that allows for this magic behavior if you wanted to.

---

<div class="post-metadata">

### Author: ![ChrisBeach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisbeach/32/214628_2.png) [@ChrisBeach](https://meta.discourse.org/u/ChrisBeach)
#### Post date: [8 mei 2017 om 14:40 UTC](https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197/8 "2017-05-08T14:40:27Z")

</div>

> [@sam](#):
>
> It is a solvable problem but there is a lot of magic that would need to be added.

I think a library like this might be a good starting point:

> <https://github.com/iainbeeston/nickel/blob/master/README.md>

---

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [8 mei 2017 om 15:24 UTC](https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197/9 "2017-05-08T15:24:19Z")

</div>

I’d rather see this done with a date picker than use any magic at all.

I think that would also be much more discoverable.

---

<div class="post-metadata">

### Author: ![elijah](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elijah/32/104055_2.png) [@elijah](https://meta.discourse.org/u/elijah)
#### Post date: [8 mei 2017 om 19:22 UTC](https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197/10 "2017-05-08T19:22:12Z")

</div>

> [@mcwumbly](#):
>
> I think that would also be much more discoverable.

And less prone to breakage with international issues. (Is today 5/8 or 8/5 in your mind?)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [8 mei 2017 om 20:19 UTC](https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197/11 "2017-05-08T20:19:48Z")

</div>

> [@sam](#):
>
> “Feb 11”

That’s the _only_ format I would suggest supporting. Unique enough to not be accidental. The year could be optional, we assume current year unless 4-digit year is provided, e.g.

> Feb 11, 2018  
> Feb 11 2018  
> Jan 30  
> Mar 3

So the regex would be

`((Jan|Feb|Mar|Apr|May|June?|July?|Aug|Sep|Oct|Nov|Dec)\s\d{1,2})(,?\s\d{4})?`

And that matches like so

 ![](https://global.discourse-cdn.com/meta/original/3X/6/0/60b398795ffc82233f298e00837340f1eadd39de.png)

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [8 mei 2017 om 20:35 UTC](https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197/12 "2017-05-08T20:35:54Z")

</div>

> [@codinghorror](#):
>
> Feb 11, 2018  
> Feb 11 2018  
> Jan 30  
> Mar 3

In the UK, and possibly other English speaking countries, these formats are fairly obscure. I would never naturally write a date like that. The day would always go first, like 11th Feb 2018.  
I would imagine that across the many languages Discourse is used in, these discrepancies get far harder to cope with.

I agree with @mcwumbly that a date picker would be a good option. I would imagine it is also waaaaaay easier to implement.

If it’s a magic feature, then it needs to support a multitude of formats to allow users to discover it naturally. A date picker is nice and clear, with no confusion (albeit at the expense of some screen real-estate).

---

<div class="post-metadata">

### Author: ![ChrisBeach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisbeach/32/214628_2.png) [@ChrisBeach](https://meta.discourse.org/u/ChrisBeach)
#### Post date: [8 mei 2017 om 20:37 UTC](https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197/13 "2017-05-08T20:37:49Z")

</div>

Just one data point: I did a quick count of the formats used by our members in recent [event listings](https://se23.life/c/events)

- **Xth Month** – 16 times
- **X Month** – 7 times
- **Month Xth** – 6 times
- **Day Xth** – 1 time

Alternative UX suggestion - provide a date picker button when we detect that the user is entering a date.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [8 mei 2017 om 20:44 UTC](https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197/14 "2017-05-08T20:44:31Z")

</div>

Fair point then I suggest a 2 pass check. We can also add an “allow two optional word chars after the number” rule to cover 3rd and 11th etc.

Pass one (US English)

`((Jan|Feb|Mar|Apr|May|June?|July?|Aug|Sep|Oct|Nov|Dec)\s\d{1,2}(\w{2})?)(,?\s\d{4})?`

Pass two (other English)

`(\d{1,2}(\w{2})?\s(Jan|Feb|Mar|Apr|May|June?|July?|Aug|Sep|Oct|Nov|Dec))(,?\s\d{4})?`

Works fine:

 ![](https://global.discourse-cdn.com/meta/original/3X/0/7/0756c33f6aa3e398379c3e6df5f75f16a3a7a886.png)

It is generally a super mega bad idea to try to “merge” two different regexes like this. Always go with multiple passes, it is far clearer.

---

<div class="post-metadata">

### Author: ![mikechristopher](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikechristopher/32/89135_2.png) [@mikechristopher](https://meta.discourse.org/u/mikechristopher)
#### Post date: [8 mei 2017 om 21:06 UTC](https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197/18 "2017-05-08T21:06:11Z")

</div>

I think this is a fantastic idea and would make a great feature / plugin component. I would be in favour of making it use a date picker.

Would be great in future and should be capable of building this into a graphical calendar like the broken calendar plugin that’s out there does.

---

<div class="post-metadata">

### Author: ![ChrisBeach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisbeach/32/214628_2.png) [@ChrisBeach](https://meta.discourse.org/u/ChrisBeach)
#### Post date: [8 mei 2017 om 21:17 UTC](https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197/19 "2017-05-08T21:17:05Z")

</div>

> [@mikechristopher](#):
>
> Would be great in future and should be capable of building this into a graphical calendar like the broken calendar plugin that’s out there does.

That’s an excellent idea - I wonder if a Discourse instance could be linked to Google Calendar, and then we can benefit from their UI, and the ability for members to subscribe to this calendar.

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [8 mei 2017 om 23:01 UTC](https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197/20 "2017-05-08T23:01:31Z")

</div>

As we’re talking about Google Calendar now, I figured I would try all of Sam’s ideas above using Google Calendar’s quick add feature. Any change Google has open sourced this?

Worked (added an event on February 11, 2018):  
“11th Feb”  
“2/11”  
“Feb 11”  
“Feb 11, 2017”  
“Feb 2 - Come to the maker fair”  
“Come to the maker fair - Feb 2”

International issue (added an event on Novermber 2, 2017):  
“11/2”

Failed (opened event editor):  
“11-02”

---

<div class="post-metadata">

### Author: ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)
#### Post date: [20 mei 2017 om 02:08 UTC](https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197/21 "2017-05-20T02:08:14Z")

</div>

> [@codinghorror](#):
>
> That’s the only format I would suggest supporting. Unique enough to not be accidental.

What about other languages? The “most used format” might be different.

For instance, nobody ever writes a 3-letter month notation in Russian / Ukrainian. We usually write “6 апреля” (6th of April), or 06.04 (date comes always first).

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [2 december 2017 om 22:21 UTC](https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197/22 "2017-12-02T22:21:22Z")

</div>

> [@jomaxro](#):
>
> Worked (added an event on February 11, 2018):

> [@jomaxro](#):
>
> “Feb 11, 2017”

❗ What? That definitely should _not_ schedule for the following year, especially seeing as this test was done on May 08 2017 - topics talking about recent past events are common.

* * *

In general though, this does seem like a good idea, and there’s now support in place with Topic Timers.

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [2 december 2017 om 23:04 UTC](https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197/23 "2017-12-02T23:04:15Z")

</div>

That was very likely a typo in my part.

[Volgende pagina](https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197.md?page=2)
