Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bph5

macrumors newbie
Original poster
Feb 26, 2016
2
0

I would like to create a script that will take me to a calculated date on my online Setmore calendar. The URL for the Setmore Calendar is:

https://my.setmore.com/calendar#daily/0/26022016 (with the last 8 digits being the date, UK format)

So far i have:

tell
application "Safari" to open location "https://my.setmore.com/" & "calendar#daily/0/" & ?

How can I add a calculation which will add the current date plus 6 weeks to the URL?
 

bph5

macrumors newbie
Original poster
Feb 26, 2016
2
0
Hi,

Personally I find AppleScript's date maths particularly clumsy and confusing. There's a good discussion and some sample code here: http://macscripter.net/viewtopic.php?id=24737

However, I'd be tempted to step out and use a little 'do shell script' to get the date like so:

set
theNewDate to do shell script "date -v +6w \"+%d%m%Y\""

Hope that helps

Thank you - this is exactly what I was looking for.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.