Skip to content

Instantly share code, notes, and snippets.

@UskeS
Created February 25, 2025 02:15
Show Gist options
  • Select an option

  • Save UskeS/743c0062466a8be58f7b28bb408d873e to your computer and use it in GitHub Desktop.

Select an option

Save UskeS/743c0062466a8be58f7b28bb408d873e to your computer and use it in GitHub Desktop.
[JXA] Insert the date.
function run(input, parameters) {
const today = new Date();
const delimiter = "."; //日付の区切り文字
const y = today.getFullYear()-2000;
const m = ("0"+(today.getMonth()+1)).slice(-2);
const d = ("0"+today.getDate()).slice(-2);
const output = `${[y,m,d].join(delimiter)}_`;
return output;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment