Comment by ideboi on 20/08/2020 at 21:34 UTC

18 upvotes, 11 direct replies (showing 11)

View submission: Updated Feature: Scheduled & Recurring Posts

View parent comment

To add the date to your scheduled post title, use the placeholder {{date <format>}} in the post title. The format section uses Python's strftime() formatting[1]. For example, if you want a title that says "Daily Scheduled Post - August 20, 2020", this would be the title:

1: https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes

"Daily Scheduled Post - {{date %B %d, %Y}}".

Once the post is submitted, the placeholder will be replaced with the formatted date.

You can also display dates other than the current date by adding an optional positive or negative offset. For example, to display the date 6 days ahead, you would do {{date+6 <format>}}. The date from 3 days before would be {{date-3 <format>}}, and so on.

Note that the date will be in UTC timezone by default

Replies

Comment by Durrok at 20/08/2020 at 23:43 UTC

19 upvotes, 0 direct replies

I know per your other post that you guys are set for the initial rollout of this. I'd like to suggest you take a look at how you do the date placeholder though. Doing it in this fashion is pretty esoteric and is going to leave anyone without programming experience scratching their heads.

A "format picker" would alleviate a lot of issues where it just enters the formatting for you would help a lot. Something like a box on one side with all the options and then a box on the other side you just drag and snap into place what you want with an example that populates below the selections. So if you want Month / Date / Year you just drag and drop the those three in order from one box to the other and in the preview you see: 8/20/2020. When you hit accept %m/%d/%Y gets inserted into the title.

Alternatively (or in addition to) if that is too much, just simplify the placeholders. %Month/%Day/%Year entered in the title converts to %m/%d/%Y on the backend.

The new features are great, but I think many programmers (including myself) often forget that things we are very familiar with are not intuitive at all for people who don't have our experience.

Comment by [deleted] at 21/08/2020 at 02:39 UTC

13 upvotes, 0 direct replies

Can you please for everyone's sanity implement something more standard and intuitive than Python's jankass nonsense? Just use the standard Apache format like basically everybody does for everything.

Comment by iPlain at 23/08/2020 at 12:53 UTC

13 upvotes, 1 direct replies

Would be nice if this could be added to the docs, as your comment was the only source of truth I could find for this FYI.

Would be good to add here:

https://mods.reddithelp.com/hc/en-us/articles/360037199532

Comment by SquareWheel at 21/08/2020 at 08:11 UTC

5 upvotes, 1 direct replies

Contrary to the others, I think the time format is perfect. That offers enough control to suit almost every purpose.

Sometimes you need to learn new skills to perform mod tasks. No different than learning regex, for instance.

Comment by 75footubi at 06/12/2020 at 12:09 UTC

4 upvotes, 0 direct replies

Less than a month before this is the default and date formatting is ***still*** not in the documentation

Comment by dredd at 01/01/2021 at 20:37 UTC

3 upvotes, 1 direct replies

Why doesn't it use the timezone the that the post was scheduled with for strftime()?

Comment by ThePerito at 20/08/2020 at 21:36 UTC

2 upvotes, 0 direct replies

thanks will try it

Comment by [deleted] at 19/10/2020 at 05:29 UTC

2 upvotes, 1 direct replies

Are you limited to only one date in the title? We have weekly discussion threads and would like to do something like:

    {{date %d %B, %Y}} - {{date+7 %d %B, %Y}}

But it ends up being mangled

Comment by onigiri815 at 10/12/2020 at 19:07 UTC

1 upvotes, 1 direct replies

Is there a way to make the future date work but for year?

I tried on a test to do

{{date+1 %Y}} and it didn't do anything

Also tried {{date+1 <%Y>}} in case somehow those other brackets were needed

Comment by HHHRobot at 25/01/2021 at 19:35 UTC

1 upvotes, 0 direct replies

So...it would really help if this was in the documentation somewhere or in the post that announced how the scheduling system works. This comment was the only place I found explaining this, and it's now 1 month after AutoMod was completely deprecated and 6 months after this system was first rolled out.

Comment by RealBlazeStorm at 28/01/2021 at 08:10 UTC

1 upvotes, 1 direct replies

Is it possible to add dates to the body of posts, or just to titles?