This code opens Calendar.app to the day of an date-type attribute.
You may need to change the locale to your locale.
// Open date in Calendar.app //
locale("de_DE");
var theDate=$MyDate.format("W, d MM y");
var theAppleScript='tell application "Calendar" to view calendar at date "'+theDate+'"';
var theShellCommand="osascript -e '"+theAppleScript+"'";
runCommand(theShellCommand);
(Not sure whether the format dot operator needs to be adjusted. I guess AppleScript uses the same format in every language. If you need to change it see @mwra’s Date Formats)
You’re probably better off using the local date format .format("l"). Your solution will work on US systems, but might fail on a system using German or Chinese.
But AppleScript expects a date in the macOS’s locale (i.e. the primary locale set in System Preferences), in my case Mittwoch, 25. Januar 2023.
(While writing the code I already wondered why Tinderbox doesn’t use my macOS’s locale (de_DE) by default. Didn’t ask because I found the locale() operator.)