Shortcut Monday: Getting a List Dates in the Future

Shortcut Monday is a series highlighting Shortcuts that I use on a regular basis. If you haven’t downloaded the Shortcuts app yet, you can do so for free here.

When I am creating a syllabus for a class it is often a slow and inaccurate (my own errors just reading a calendar properly!) process to get a list of dates in the future. For example, if I’m wanting every Monday for the next 16 weeks I can open up my calendar and write the dates down…or I can use this shortcut.

Download Shortcut

The first step of the workflow is a simple Ask for Input for the number of weeks. The next step takes this total and subtracts one from that number because the workflow will using the starting date that I give it in the next step as the first week.

The second step just asks for the starting date that I would like to use. Next, I format the date for what I would like and set the variable to store for later. The Nothing action just separates the next step so input doesn’t continue being passed through the workflow.

Next, a slightly more complicated calculation that I would not have figured out without the help of sylumer on the Automator’s Discourse forum.

  1. Repeat: This takes the number of weeks that we inputted first and will repeat the following actions X number of times.
  2. Get Variable repeat index: this one is a little bit more complicated but basically it will take the first number and multiple by 7 (1×7), second time through (2×7), third time through (3×7) and so forth.
  3. Next, we will grab the start date with a variable
  4. Adjust Date: this adds the number of days from the repeated variable
  5. Format Date: formats the date properly
  6. Add to Variable: This stores all the dates in a list that we will use in the next step.

Finally, the next group of actions is pretty simple. I first grab the variable from the list of dates and use the Split Text action to make sure they are all on new lines then I copy that text to the clipboard and open Drafts. I have decided if I want to keep the Add to Draft action but currently that is how I have it setup.

You can view the entire Siri Shortcut below.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s