Rename lists to have dates
Asked by Rogue Templates:

Using Trello, Pro4Trello and List Layouts for Trello I have made myself a nifty little two week planner.

I can drag my tasks around really easily, important as my clients often don't do their projects when they say they will. I am a Microsoft Office developer so lots of small projects on the go and a few bigger ones too.

The TODAY card has a due date of tmrw and a "due date" rule moves the card along the week, renaming it each day and shifting the due date to the next weekeday. As I complete a task I shift it above the Today card.

What I'd like to have is the dates along the top of the list names, so Mon 29, Tue 30, etc. and not need to label Today.

Obviously I could do that manually but be tedious to update each week so I was hoping to have a board button perhaps that would set the dates onto the list names when pressed, or something automatic based on what the Today card's automation is already doing.

What I can't figure out is how to rename a list based on just the start of it. I can only find an option to rename based on an exact name and then the routine fails if run again because "Monday" is no longer "Monday", it is "Monday 29"

Is there a way I can find a list that begins "Monday" and rename name it to be "Monday {monthdaynumber}"? (i'll need to factor in what day I press it of course).

I realise Monday (next) would also get hit but I can change that to be "Next Monday" instead. Just want day numbers on the top row for now.

Thanks

Simon

![Trello Q 2.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/190512iA7C151C7D3F533D8/image-size/large?v=v2&px=999 "Trello Q 2.JPG")


Answers:
author: Artemis
body: Hi [@Rogue Templates](/t5/user/viewprofilepage/user-id/4845888), welcome!
> Is there a way I can find a list that begins "Monday"

Indeed---use the wildcard value {\*} in your rule. Here's how that would look in a Due Date command:

```
every monday, rename list "Monday {*}" to "Monday {monthdaynumber}"
```

The wildcard tells Butler to find a list that *begins* with Monday, with the understanding that the wildcard will contain some unspecified value after "Monday". Hope this helps.

comments: author: Rogue Templates
body: Excellent, thanks for that. Not come across the general wildcard before. Can see that being very useful!


author: Artemis
body: You're welcome! You can get even more specific with wildcards to make some "power-user" automations. I'd encourage you to check out the support page to learn more --- <https://help.trello.com/article/1156-pattern-matching-and-wildcards>


author: Rogue Templates
body: Thanks for that. I hadn't found that page but I did find the arithmetics one (<https://help.trello.com/article/1159-arithmetic-in-date-variables>)

In the end I went with a Calendar automation that will run every Monday and it has these actions ...

![ab.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/190670iDEBE0CA8193B3176/image-size/large?v=v2&px=999 "ab.JPG")

... and so on for each of my lists in the current week and next week (now called Next Mon, Next Tue, etc.).

I realised, after I had set them up, I could have had the day's name as part of the date format but I decided to leave it like this because easier to see what if happening.

My lists now have the right dates on them, with st, nd, rd or th suffixes too.


author: Austin Long
body: How do you continue this Automation? it works great the first time I run the command, but after the lists are renamed it no longer recognizes the command correctly because the lists are now named with as 'Monday 19th' instead of 'Mon{\*}'


author: Rogue Templates
body: Hi

I created a timed Automation in the Calendar bit of Butler.

The command reads like this ...

![ab.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/217627iC07EDAF5D0F1CBCB/image-size/large?v=v2&px=999 "ab.JPG")

So, on Monday at 1:00 am it looks for any list that starts with Mon - that is what "Mon{\*}" means, find any list where the name starts with "Mon" and is followed by something else "{\*}".

It changes that list name to be Monday, XXzz where XX is date=1wd (this is the first Monday of the week) and zz is the ordinal, e.g. th, nd, rd, etc., that suits the date.

It then does the same for any list that starts "Tue" but replaces the name an XX that is date=2wd - first Tues of the week.

And so on throuhg all five days of the first week.

It then repeats 5 more times but this time looking for "Next Mon{\*}" and replaces that with Next Mon XXzz etc. I had to use Next at the start of week 2 so I can distinguish them.

Does that make snese, it seems horrible to look at but once you break it down it is just repetition.

Thanks

Simon


Tags: automation