blob: f098187cf07ffbe840dc3b0f997b7f300a1e78bf [file] [log] [blame]
tsepez86a61dc2016-03-25 10:00:11 -07001{{header}}
2{{object 1 0}} <<
3 /Type /Catalog
4 /Pages 2 0 R
5 /OpenAction 10 0 R
6>>
7endobj
8{{object 2 0}} <<
9 /Type /Pages
10 /Count 1
11 /Kids [
12 3 0 R
13 ]
14>>
15endobj
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>>
32endobj
33% JS program to exexute
34{{object 11 0}} <<
35>>
36stream
37function 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}
45function 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.
54var d1 = new Date(2014, 06, 04, 15, 59, 58);
55TestOneFormat("mm/dd/yyyy HH:MM:ss", d1);
56TestOneFormat(0, d1);
57TestOneFormat(1, d1);
58TestOneFormat(2, d1);
59TestOneFormat(3, d1);
60TestOneFormat("mmmm", d1);
61TestOneFormat("mmm", d1);
62TestOneFormat("mm", d1);
63TestOneFormat("m", d1);
64TestOneFormat("dddd", d1);
65TestOneFormat("ddd", d1);
66TestOneFormat("dd", d1);
67TestOneFormat("d", d1);
68TestOneFormat("yyyy", d1);
69TestOneFormat("yy", d1);
70TestOneFormat("HH", d1);
71TestOneFormat("H", d1);
72TestOneFormat("hh", d1);
73// "h" is inconsitent between platforms: " 3" vs. "3"
74TestOneFormat("MM", d1);
75TestOneFormat("M", d1);
76TestOneFormat("ss", d1);
77TestOneFormat("s", d1);
78// "tt" is inconsitent between platforms: "PM" vs, "pm" vs. "P"
79TestOneFormat("t", d1);
80TestOneFormat("abc.efg.i.kl.nopqr..uvwxyzABC.EFG.I.KL.NOPQR..UVWXYZ0123456780", d1);
81TestOneFormat("!@#$^&*()-_<>[];:~", d1);
82TestOneFormat("%z %d %%z %%d %%%z %%%d %%% hh:MM", d1);
83TestOneFormat("", d1);
84TestOneFormat("mm/dd/yyyy", d1);
85TestOneFormat("mm/dd/yyyy", new Date(1850, 0, 1));
86TestOneFormat("mm/dd/yyyy", new Date(2525, 11, 31));
87TestOneFormat("mm/dd/yyyy");
88TestOneFormat();
89TestOneFormat("mm/dd/yyyy", 42);
90TestOneFormat("mm/dd/yyyy", "clams");
91TestOneFormat("mm/dd/yyyy", {"clams": 3});
92TestOneFormat("mm/dd/yyyy", ["clams", 3]);
93TestOneFormat({"clams": 3}, d1);
94TestOneFormat(["clams", 3], d1);
95TestOneXFAFormat("mm", d1, false);
96TestOneXFAFormat("mm", d1, true);
97endstream
98endobj
99{{xref}}
100trailer <<
101 /Root 1 0 R
102>>
103{{startxref}}
104%%EOF