Getting calendar events from the past


#1

Good morning Automators,

me not being an expert on Siri Shortcut and basically just starting I am running into an issue this great team might be able to help me with:
I was motivated by the Automators session about journaling and as I am a user of Day One I was putting my own automation up considering certain elements I need to have covered, etc.
One of the features I wanted to add was to obtain the content of one of my calendars. That is as follows:

I am checking whether I am doing my Day One entry before 2pm - if so, I will make an entry about the day before, which concludes that I want to collect my calendar entries from the day before as well.

In my shortcut that looks as follows:



  • I check the current date
  • Format it without time stamp
  • Check whether it is before 2pm
  • if so, I use the current date, subtract 1 day and
  • format it without time stamp
  • set a variable called „Datum“
  • and then „Find calendar events where“ start date is „Datum“
  • then a variable and a quick look to check

As you can see the outcome is no items were passed - however, there were 5 items during that day …

I am sure it is the variable but I also had a „Quick Look“ on the variable and it looked fine without any time stamp that might screw it up.

If I do not use a variable and use just „Start date is in the last two days“ it works fine but then it would also add todays items to yesterdays journal entry :wink:

Anybody here sees what I am not seeing ?

Thanks a lot for helping out, if you know the mistake I am making …

Cheers

Sven


#2

I think what might be happening is that it’s only looking for calendar events at the current time yesterday. Even though you’ve formatted the date differently I suspect the underlying information is the same (ie includes the time).

If you create two variables, one being “Datum 0:00” and one being “Datum 23:59” and then use them both (as a “between” these two dates) to search the calendar, that might work?

Untested at this stage so might be wrong!


#3

Just did a quick check and this seemed to work on my end; let me know how you get on. :slight_smile:


#4

Splendid - after I played around with “Adjust time” it works perfectly! Thanks a lot @Kaitlin -great help!


#5

Having done now a functional shortcut for separating a journal entry between today and yesterday, I came to realize that Day One in combination with Siri Shortcut does not offer an possibility to enter an entry via shortcut for any other date than the current date of entry :frowning:
But anyhow, it was a good exercise :wink:


#6

If you add a photo it should offer to use the date of the photo for the entry, but yes - this is a problem I’ve encountered too!


#7

That is a very good idea - at least for those days I am adding a photo to :wink:
This is all at the beginning of the development and I am sure that we will get more options for the development (e.g. functions :wink: ).

Thanks!


#8

You may have already thought of this—and it’s certainly not a perfect solution—but you should be able to adjust the date manually before saving. At least you’ll have your entry as you want it and on the correct day, but it is another step to remember…