[JSX]Acrobatのフォームで日付【自分メモ】
ファイルを開いた時
function docOpened()
{
var DocOpenDate = util.printd("yyyy/mm/dd/-HH:MM", new Date());
this.getField("フィールド名").value = DocOpenDate;
}
docOpened();
ボタンを押した時
this.getField("フィールド名").value = util.printd("yyyy/mm/dd-HH:MM",new Date());
ダイナミックスタンプで
【[Acrobat]ダイナミックスタンプを登録する【Macで】: [FORCE]】[LINK]![]()
印刷ボタンを押したら
var sDate = util.printd("yyyy/mm/dd-HH:MM", new Date());
this.getField("フィールド名").value = sDate;
var PrintCom = this.getPrintParams();
this.print(PrintCom);
| String | Effect | Example |
| mmmm | Long month | September |
| mmm | Abbreviated month | Sept |
| mm | Numeric month with leading zero | 09 |
| m | Numeric month without leading zero | 9 |
| dddd | Long day | Wednesday |
| ddd | Abbreviated day | Wed |
| dd | Numeric date with leading zero | 03 |
| d | Numeric date without leading zero | 3 |
| yyyy | Long year | 1997 |
| yy | Abbreviate Year | 97 |
| HH | 24 hour time with leading zero | 21 |
| H | 24 hour time without leading zero | 9 |
| hh | 12 hour time with leading zero | 09 |
| h | 12 hour time without leading zero | 9 |
| MM | minutes with leading zero | 08 |
| M | minutes without leading zero | 8 |
| ss | seconds with leading zero | 05 |
| s | seconds without leading zero | 5 |
| tt | am/pm indication | am |
| t | single digit am/pm indication | a |
| j | Japanese Emperor Year (abbreviated) | H22 |
| jj | Japanese Emperor Year | 平成22 |
| \ | use as an escape character |
日本語の『曜日』めんどくさっ
こちらの記事[LINK]
に追記があります
| 固定リンク
「AcrobatJS」カテゴリの記事
- [JS]Cropメニュー(連続ページに変換) 集約された2in1(2UP)のPDFを個別のページに分割します(2023.04.06)
- [Acrobat Javascripts]ページ順の入れ替え(2021.10.13)
- 【AcrobatJS】見開きページを単ページの連続ページに変更する(修正版)(2021.10.11)
- [Acrobat JS]appGetPageSize.js修正(2021.07.23)
- [Acrobat JS]openConsole.jsを修正(2021.07.23)
この記事へのコメントは終了しました。






[RSS]
コメント