1 {{header}} 2 {{object 1 0}} << 3 /Type /Catalog 4 /Pages 2 0 R 5 /OpenAction 10 0 R 6 >> 7 endobj 8 {{object 2 0}} << 9 /Type /Pages 10 /Count 1 11 /Kids [ 12 3 0 R 13 ] 14 >> 15 endobj 16 % Page number 0. 17 {{object 3 0}} << 18 /Type /Page 19 /Parent 2 0 R 20 /Resources << 21 /Font <</F1 15 0 R>> 22 >> 23 /Contents [21 0 R] 24 /MediaBox [0 0 612 792] 25 >> 26 % OpenAction action 27 {{object 10 0}} << 28 /Type /Action 29 /S /JavaScript 30 /JS 11 0 R 31 >> 32 endobj 33 % JS program to exexute 34 {{object 11 0}} << 35 >> 36 stream 37 function TestOneFormat(str, d) { 38 try { 39 app.alert(str + ": " + util.printd(str, d)); 40 } 41 catch (e) { 42 app.alert(str + ": Caught error: " + e); 43 } 44 } 45 function TestOneXFAFormat(str, d, flag) { 46 try { 47 app.alert(str + ": " + util.printd(str, d, flag)); 48 } 49 catch (e) { 50 app.alert(str + ": Caught error: " + e); 51 } 52 } 53 // July 4th, 2014 11:59:59 AM local time. 54 var d1 = new Date(2014, 06, 04, 15, 59, 58); 55 TestOneFormat("mm/dd/yyyy HH:MM:ss", d1); 56 TestOneFormat(0, d1); 57 TestOneFormat(1, d1); 58 TestOneFormat(2, d1); 59 TestOneFormat(3, d1); 60 TestOneFormat("mmmm", d1); 61 TestOneFormat("mmm", d1); 62 TestOneFormat("mm", d1); 63 TestOneFormat("m", d1); 64 TestOneFormat("dddd", d1); 65 TestOneFormat("ddd", d1); 66 TestOneFormat("dd", d1); 67 TestOneFormat("d", d1); 68 TestOneFormat("yyyy", d1); 69 TestOneFormat("yy", d1); 70 TestOneFormat("HH", d1); 71 TestOneFormat("H", d1); 72 TestOneFormat("hh", d1); 73 // "h" is inconsitent between platforms: " 3" vs. "3" 74 TestOneFormat("MM", d1); 75 TestOneFormat("M", d1); 76 TestOneFormat("ss", d1); 77 TestOneFormat("s", d1); 78 // "tt" is inconsitent between platforms: "PM" vs, "pm" vs. "P" 79 TestOneFormat("t", d1); 80 TestOneFormat("abc.efg.i.kl.nopqr..uvwxyzABC.EFG.I.KL.NOPQR..UVWXYZ0123456780", d1); 81 TestOneFormat("!@#$^&*()-_<>[];:~", d1); 82 TestOneFormat("%z %d %%z %%d %%%z %%%d %%% hh:MM", d1); 83 TestOneFormat("", d1); 84 TestOneFormat("mm/dd/yyyy", d1); 85 TestOneFormat("mm/dd/yyyy", new Date(1850, 0, 1)); 86 TestOneFormat("mm/dd/yyyy", new Date(2525, 11, 31)); 87 TestOneFormat("mm/dd/yyyy"); 88 TestOneFormat(); 89 TestOneFormat("mm/dd/yyyy", 42); 90 TestOneFormat("mm/dd/yyyy", "clams"); 91 TestOneFormat("mm/dd/yyyy", {"clams": 3}); 92 TestOneFormat("mm/dd/yyyy", ["clams", 3]); 93 TestOneFormat({"clams": 3}, d1); 94 TestOneFormat(["clams", 3], d1); 95 TestOneXFAFormat("mm", d1, false); 96 TestOneXFAFormat("mm", d1, true); 97 endstream 98 endobj 99 {{xref}} 100 trailer << 101 /Root 1 0 R 102 >> 103 {{startxref}} 104 %%EOF 105