
このエクスプレッションは、現在の日付を取得する簡単な方法を提供します。ダイナミックな日付表示を作成するのに便利です。テキストレイヤーの Source Text プロパティに適用してください。
d = new Date(Date(0));
// Format Settings
// Format Settings
divider = “/”
yearLength = 2; // use 2 for YY, 4 for YYYY
function padZeros(n){
if(n <= 9){
return “0” + n;
}
return n
}
yearTrim = (yearLength===2) ? 2 : 0;
“” + padZeros(d.getMonth()+1) + divider + padZeros(d.getDate()) + divider + d.getFullYear().toString().substring(yearTrim,4);プロのヒント:AEJuice Pack Manager – Expressions Pack を使えば、このエクスプレッションをワンクリックで適用できます。最新版プラグインの直接リンクはこちらです:
Windows / macOS
if(n <= 9){
return “0” + n;
}
return n
}
yearTrim = (yearLength===2) ? 2 : 0;
“” + padZeros(d.getMonth()+1) + divider + padZeros(d.getDate()) + divider + d.getFullYear().toString().substring(yearTrim,4);プロのヒント:AEJuice Pack Manager – Expressions Pack を使えば、このエクスプレッションをワンクリックで適用できます。最新版プラグインの直接リンクはこちらです:
Windows / macOS
