View Javadoc
1   /*
2    * Copyright (c) 2002-2025 Gargoyle Software Inc.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * https://www.apache.org/licenses/LICENSE-2.0
8    *
9    * Unless required by applicable law or agreed to in writing, software
10   * distributed under the License is distributed on an "AS IS" BASIS,
11   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12   * See the License for the specific language governing permissions and
13   * limitations under the License.
14   */
15  package org.htmlunit.javascript.host.intl;
16  
17  import org.apache.commons.lang3.CharUtils;
18  import org.htmlunit.WebDriverTestCase;
19  import org.htmlunit.junit.BrowserRunner;
20  import org.htmlunit.junit.annotation.Alerts;
21  import org.htmlunit.junit.annotation.BuggyWebDriver;
22  import org.htmlunit.junit.annotation.HtmlUnitNYI;
23  import org.junit.ComparisonFailure;
24  import org.junit.Test;
25  import org.junit.runner.RunWith;
26  
27  /**
28   * Tests for {@link DateTimeFormat}.
29   *
30   * @author Ronald Brill
31   * @author Ahmed Ashour
32   */
33  @RunWith(BrowserRunner.class)
34  public class DateTimeFormat2Test extends WebDriverTestCase {
35  
36      private void test(final String... string) throws Exception {
37          final StringBuilder html = new StringBuilder(DOCTYPE_HTML
38              + "<html><head>\n"
39              + "<script>\n"
40              + LOG_TEXTAREA_FUNCTION
41              + "  function test() {\n"
42              + "    var date = new Date(Date.UTC(2013, 11, 20, 7, 0, 0));\n"
43              + "    try {\n");
44          for (int i = 0; i < string.length - 1; i++) {
45              html.append(string[i]).append("\n");
46          }
47          html.append(
48              "      log(" + string[string.length - 1] + ");\n"
49              + "    } catch(e) { logEx(e) }\n"
50              + "  }\n"
51              + "</script>\n"
52              + "</head><body onload='test()'>\n"
53              + LOG_TEXTAREA
54              + "</body></html>");
55  
56          try {
57              loadPageVerifyTextArea2(html.toString());
58          }
59          catch (final ComparisonFailure e) {
60              final String msg = e.getMessage();
61              for (int i = 0; i < msg.length(); i++) {
62                  final char c = msg.charAt(i);
63                  if (CharUtils.isAscii(c)) {
64                      System.out.print(c);
65                  }
66                  else {
67                      System.out.print(CharUtils.unicodeEscaped(c));
68                  }
69              }
70              System.out.println();
71              throw e;
72          }
73      }
74  
75      /**
76       * @throws Exception if the test fails
77       */
78      @Test
79      @Alerts("[object Intl]")
80      public void intl() throws Exception {
81          test("Intl");
82      }
83  
84      /**
85       * @throws Exception if the test fails
86       */
87      @Test
88      @Alerts("12/20/2013")
89      public void format_default() throws Exception {
90          test("new Intl.DateTimeFormat().format(date)");
91      }
92  
93      /**
94       * @throws Exception if the test fails
95       */
96      @Test
97      @Alerts("H25/12/20")
98      public void format_ja_jp_u_ca_japanese() throws Exception {
99          test("new Intl.DateTimeFormat('ja-JP-u-ca-japanese').format(date)");
100     }
101 
102     /**
103      * Test not supported locale.
104      *
105      * @throws Exception if the test fails
106      */
107     @Test
108     @Alerts("12/20/2013")
109     public void format_ban() throws Exception {
110         test("new Intl.DateTimeFormat('ban').format(date)");
111     }
112 
113     /**
114      * @throws Exception if the test fails
115      */
116     @Test
117     @Alerts("20/12/2013")
118     public void format_id() throws Exception {
119         test("new Intl.DateTimeFormat('id').format(date)");
120     }
121 
122     /**
123      * Test the fallback language, in this case {@code Indonesian}.
124      *
125      * @throws Exception if the test fails
126      */
127     @Test
128     @Alerts("20/12/2013")
129     public void format_ban_id() throws Exception {
130         test("new Intl.DateTimeFormat(['ban', 'id']).format(date)");
131     }
132 
133     /**
134      * @throws Exception if the test fails
135      */
136     @Test
137     @Alerts("Freitag, 20. Dezember 2013")
138     @HtmlUnitNYI(CHROME = "20.12.2013",
139             EDGE = "20.12.2013",
140             FF = "20.12.2013",
141             FF_ESR = "20.12.2013")
142     public void format_weekday_long() throws Exception {
143         test("var options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };",
144                 "new Intl.DateTimeFormat('de-DE', options).format(date)");
145     }
146 
147     /**
148      * @throws Exception if the test fails
149      */
150     @Test
151     @Alerts("Freitag, 20. Dezember 2013 n. Chr. um 02:00:00")
152     @BuggyWebDriver(FF = "Freitag, 20. Dezember 2013 n. Chr. um 08:00:00",
153                     FF_ESR = "Freitag, 20. Dezember 2013 n. Chr. um 08:00:00")
154     @HtmlUnitNYI(CHROME = "20.12.2013",
155             EDGE = "20.12.2013",
156             FF = "20.12.2013",
157             FF_ESR = "20.12.2013")
158     public void format_weekday_long_all() throws Exception {
159         test("var options = { weekday: 'long', era: 'long', year: 'numeric', month: 'long', day: 'numeric',"
160                 + " hour: 'numeric', minute: 'numeric', second: 'numeric' };",
161                 "new Intl.DateTimeFormat('de-DE', options).format(date)");
162     }
163 
164     /**
165      * @throws Exception if the test fails
166      */
167     @Test
168     @Alerts("Freitag")
169     @HtmlUnitNYI(CHROME = "20.12.2013",
170             EDGE = "20.12.2013",
171             FF = "20.12.2013",
172             FF_ESR = "20.12.2013")
173     public void format_weekday_long_all_weekday() throws Exception {
174         test("var options = { weekday: 'long' };",
175                 "new Intl.DateTimeFormat('de-DE', options).format(date)");
176     }
177 
178     /**
179      * @throws Exception if the test fails
180      */
181     @Test
182     @Alerts("n. Chr. Freitag")
183     @HtmlUnitNYI(CHROME = "20.12.2013",
184             EDGE = "20.12.2013",
185             FF = "20.12.2013",
186             FF_ESR = "20.12.2013")
187     public void format_weekday_long_weekday_era() throws Exception {
188         test("var options = { weekday: 'long', era: 'long' };",
189                 "new Intl.DateTimeFormat('de-DE', options).format(date)");
190     }
191 
192     /**
193      * @throws Exception if the test fails
194      */
195     @Test
196     @Alerts("20.12.2013 n. Chr.")
197     @HtmlUnitNYI(CHROME = "20.12.2013",
198             EDGE = "20.12.2013",
199             FF = "20.12.2013",
200             FF_ESR = "20.12.2013")
201     public void format_weekday_long_era() throws Exception {
202         test("var options = { era: 'long' };",
203                 "new Intl.DateTimeFormat('de-DE', options).format(date)");
204     }
205 
206     /**
207      * @throws Exception if the test fails
208      */
209     @Test
210     @Alerts("2013 n. Chr. Freitag")
211     @HtmlUnitNYI(CHROME = "20.12.2013",
212             EDGE = "20.12.2013",
213             FF = "20.12.2013",
214             FF_ESR = "20.12.2013")
215     public void format_weekday_long_weekday_era_year() throws Exception {
216         test("var options = { weekday: 'long', era: 'long', year: 'numeric' };",
217                 "new Intl.DateTimeFormat('de-DE', options).format(date)");
218     }
219 
220     /**
221      * @throws Exception if the test fails
222      */
223     @Test
224     @Alerts("Dezember 2013 n. Chr. Freitag")
225     @HtmlUnitNYI(CHROME = "20.12.2013",
226             EDGE = "20.12.2013",
227             FF = "20.12.2013",
228             FF_ESR = "20.12.2013")
229     public void format_weekday_long_weekday_era_year_month() throws Exception {
230         test("var options = { weekday: 'long', era: 'long', year: 'numeric', month: 'long' };",
231                 "new Intl.DateTimeFormat('de-DE', options).format(date)");
232     }
233 
234     /**
235      * @throws Exception if the test fails
236      */
237     @Test
238     @Alerts(DEFAULT = "\u0627\u0644\u062c\u0645\u0639\u0629\u060c 20 \u062f\u064a\u0633\u0645\u0628\u0631 2013 "
239                     + "\u0645\u064a\u0644\u0627\u062f\u064a \u0641\u064a 2:00:00 \u0635",
240             FF = "\u0627\u0644\u062c\u0645\u0639\u0629\u060c 20 \u062f\u064a\u0633\u0645\u0628\u0631 2013 "
241                     + "\u0645\u064a\u0644\u0627\u062f\u064a \u0641\u064a 8:00:00 \u0635",
242             FF_ESR = "\u0627\u0644\u062c\u0645\u0639\u0629\u060c \u0662\u0660 \u062f\u064a\u0633\u0645\u0628\u0631 "
243                     + "\u0662\u0660\u0661\u0663 \u0645\u064a\u0644\u0627\u062f\u064a "
244                     + "\u0641\u064a \u0668:\u0660\u0660:\u0660\u0660 \u0635")
245     @HtmlUnitNYI(CHROME = "\u0662\u0660\u200f/\u0661\u0662\u200f/\u0662\u0660\u0661\u0663",
246             EDGE = "\u0662\u0660\u200f/\u0661\u0662\u200f/\u0662\u0660\u0661\u0663",
247             FF = "\u0662\u0660\u200f/\u0661\u0662\u200f/\u0662\u0660\u0661\u0663",
248             FF_ESR = "\u0662\u0660\u200f/\u0661\u0662\u200f/\u0662\u0660\u0661\u0663")
249     public void format_weekday_long_all_ar() throws Exception {
250         test("var options = { weekday: 'long', era: 'long', year: 'numeric', month: 'long', day: 'numeric',"
251                 + " hour: 'numeric', minute: 'numeric', second: 'numeric' };",
252                 "new Intl.DateTimeFormat('ar', options).format(date)");
253     }
254 
255     /**
256      * @throws Exception if the test fails
257      */
258     @Test
259     @Alerts(CHROME = "Friday, December 20, 2013 at UTC",
260             EDGE = "Friday, December 20, 2013 at UTC",
261             FF = "Friday, December 20, 2013 at UTC",
262             FF_ESR = "Friday, December 20, 2013 at UTC")
263     @HtmlUnitNYI(CHROME = "12/20/2013",
264             EDGE = "12/20/2013",
265             FF = "12/20/2013",
266             FF_ESR = "12/20/2013")
267     public void format_utc_short() throws Exception {
268         test("var options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };",
269                 "options.timeZone = 'UTC';",
270                 "options.timeZoneName = 'short';",
271                 "new Intl.DateTimeFormat('en-US', options).format(date)");
272     }
273 
274     /**
275      * @throws Exception if the test fails
276      */
277     @Test
278     @Alerts("2:00:00 am GMT-5")
279     @BuggyWebDriver(FF = "8:00:00 am GMT+1", FF_ESR = "8:00:00 am GMT+1")
280     @HtmlUnitNYI(CHROME = "20/12/2013",
281             EDGE = "20/12/2013",
282             FF = "20/12/2013",
283             FF_ESR = "20/12/2013")
284     public void format_detailed() throws Exception {
285         test("options = {",
286                 " hour: 'numeric', minute: 'numeric', second: 'numeric',",
287                 " timeZoneName: 'short'",
288                 "};",
289                 "new Intl.DateTimeFormat('en-AU', options).format(date)");
290     }
291 
292     /**
293      * @throws Exception if the test fails
294      */
295     @Test
296     @Alerts("12/20/2013, 02:00:00")
297     @BuggyWebDriver(FF = "12/20/2013, 08:00:00", FF_ESR = "12/20/2013, 08:00:00")
298     @HtmlUnitNYI(CHROME = "12/20/2013",
299             EDGE = "12/20/2013",
300             FF = "12/20/2013",
301             FF_ESR = "12/20/2013")
302     public void format_detailed_24h() throws Exception {
303         test("var options = {",
304                 " year: 'numeric', month: 'numeric', day: 'numeric',",
305                 " hour: 'numeric', minute: 'numeric', second: 'numeric',",
306                 " hour12: false",
307                 "};",
308                 "new Intl.DateTimeFormat('en-US', options).format(date)");
309     }
310 
311     /**
312      * @throws Exception if the test fails
313      */
314     @Test
315     @Alerts(DEFAULT = "\u0662\u0660\u200F/\u0661\u0662\u200F/\u0662\u0660\u0661\u0663",
316             CHROME = "20\u200f/12\u200f/2013",
317             EDGE = "20\u200f/12\u200f/2013")
318     @HtmlUnitNYI(CHROME = "\u0662\u0660\u200f/\u0661\u0662\u200f/\u0662\u0660\u0661\u0663",
319             EDGE = "\u0662\u0660\u200f/\u0661\u0662\u200f/\u0662\u0660\u0661\u0663")
320     public void format_ar() throws Exception {
321         test("new Intl.DateTimeFormat('ar').format(date)");
322     }
323 
324     /**
325      * @throws Exception if the test fails
326      */
327     @Test
328     @Alerts("20‏/12‏/2013")
329     @HtmlUnitNYI(CHROME = "\u0662\u0660\u200F/\u0661\u0662\u200F/\u0662\u0660\u0661\u0663",
330                  EDGE = "\u0662\u0660\u200F/\u0661\u0662\u200F/\u0662\u0660\u0661\u0663",
331                  FF = "\u0662\u0660\u200F/\u0661\u0662\u200F/\u0662\u0660\u0661\u0663",
332                  FF_ESR = "\u0662\u0660\u200F/\u0661\u0662\u200F/\u0662\u0660\u0661\u0663")
333     public void format_ar_ae() throws Exception {
334         test("new Intl.DateTimeFormat('ar-AE').format(date)");
335     }
336 
337     /**
338      * @throws Exception if the test fails
339      */
340     @Test
341     @Alerts("\u0662\u0660\u200F/\u0661\u0662\u200F/\u0662\u0660\u0661\u0663")
342     public void format_ar_bh() throws Exception {
343         test("new Intl.DateTimeFormat('ar-BH').format(date)");
344     }
345 
346     /**
347      * @throws Exception if the test fails
348      */
349     @Test
350     @Alerts("20\u200F/12\u200F/2013")
351     public void format_ar_dz() throws Exception {
352         test("new Intl.DateTimeFormat('ar-DZ').format(date)");
353     }
354 
355     /**
356      * @throws Exception if the test fails
357      */
358     @Test
359     @Alerts("\u0662\u0660\u200F/\u0661\u0662\u200F/\u0662\u0660\u0661\u0663")
360     public void format_ar_eg() throws Exception {
361         test("new Intl.DateTimeFormat('ar-EG').format(date)");
362     }
363 
364     /**
365      * @throws Exception if the test fails
366      */
367     @Test
368     @Alerts("\u0662\u0660\u200F/\u0661\u0662\u200F/\u0662\u0660\u0661\u0663")
369     public void format_ar_iq() throws Exception {
370         test("new Intl.DateTimeFormat('ar-IQ').format(date)");
371     }
372 
373     /**
374      * @throws Exception if the test fails
375      */
376     @Test
377     @Alerts("\u0662\u0660\u200F/\u0661\u0662\u200F/\u0662\u0660\u0661\u0663")
378     public void format_ar_jo() throws Exception {
379         test("new Intl.DateTimeFormat('ar-JO').format(date)");
380     }
381 
382     /**
383      * @throws Exception if the test fails
384      */
385     @Test
386     @Alerts("\u0662\u0660\u200F/\u0661\u0662\u200F/\u0662\u0660\u0661\u0663")
387     public void format_ar_kw() throws Exception {
388         test("new Intl.DateTimeFormat('ar-KW').format(date)");
389     }
390 
391     /**
392      * @throws Exception if the test fails
393      */
394     @Test
395     @Alerts("\u0662\u0660\u200F/\u0661\u0662\u200F/\u0662\u0660\u0661\u0663")
396     public void format_ar_lb() throws Exception {
397         test("new Intl.DateTimeFormat('ar-LB').format(date)");
398     }
399 
400     /**
401      * @throws Exception if the test fails
402      */
403     @Test
404     @Alerts("20\u200F/12\u200F/2013")
405     public void format_ar_ly() throws Exception {
406         test("new Intl.DateTimeFormat('ar-LY').format(date)");
407     }
408 
409     /**
410      * @throws Exception if the test fails
411      */
412     @Test
413     @Alerts("20\u200F/12\u200F/2013")
414     public void format_ar_ma() throws Exception {
415         test("new Intl.DateTimeFormat('ar-MA').format(date)");
416     }
417 
418     /**
419      * @throws Exception if the test fails
420      */
421     @Test
422     @Alerts("\u0662\u0660\u200F/\u0661\u0662\u200F/\u0662\u0660\u0661\u0663")
423     public void format_ar_om() throws Exception {
424         test("new Intl.DateTimeFormat('ar-OM').format(date)");
425     }
426 
427     /**
428      * @throws Exception if the test fails
429      */
430     @Test
431     @Alerts("\u0662\u0660\u200F/\u0661\u0662\u200F/\u0662\u0660\u0661\u0663")
432     public void format_ar_qa() throws Exception {
433         test("new Intl.DateTimeFormat('ar-QA').format(date)");
434     }
435 
436     /**
437      * @throws Exception if the test fails
438      */
439     @Test
440     @Alerts(DEFAULT = "\u0661\u0667\u200f/\u0662\u200f/\u0661\u0664\u0663\u0665 \u0647\u0640",
441             FF = "\u0662\u0660\u200f/\u0661\u0662\u200f/\u0662\u0660\u0661\u0663")
442     public void format_ar_sa() throws Exception {
443         test("new Intl.DateTimeFormat('ar-SA').format(date)");
444     }
445 
446     /**
447      * @throws Exception if the test fails
448      */
449     @Test
450     @Alerts("\u0662\u0660\u200F/\u0661\u0662\u200F/\u0662\u0660\u0661\u0663")
451     public void format_ar_sd() throws Exception {
452         test("new Intl.DateTimeFormat('ar-SD').format(date)");
453     }
454 
455     /**
456      * @throws Exception if the test fails
457      */
458     @Test
459     @Alerts("\u0662\u0660\u200F/\u0661\u0662\u200F/\u0662\u0660\u0661\u0663")
460     public void format_ar_sy() throws Exception {
461         test("new Intl.DateTimeFormat('ar-SY').format(date)");
462     }
463 
464     /**
465      * @throws Exception if the test fails
466      */
467     @Test
468     @Alerts("20\u200F/12\u200F/2013")
469     public void format_ar_tn() throws Exception {
470         test("new Intl.DateTimeFormat('ar-TN').format(date)");
471     }
472 
473     /**
474      * @throws Exception if the test fails
475      */
476     @Test
477     @Alerts("\u0662\u0660\u200F/\u0661\u0662\u200F/\u0662\u0660\u0661\u0663")
478     public void format_ar_ye() throws Exception {
479         test("new Intl.DateTimeFormat('ar-YE').format(date)");
480     }
481 
482     /**
483      * @throws Exception if the test fails
484      */
485     @Test
486     @Alerts(DEFAULT = "20.12.2013",
487             CHROME = "12/20/2013",
488             EDGE = "12/20/2013")
489     public void format_be() throws Exception {
490         test("new Intl.DateTimeFormat('be').format(date)");
491     }
492 
493     /**
494      * @throws Exception if the test fails
495      */
496     @Test
497     @Alerts(DEFAULT = "20.12.2013",
498             CHROME = "12/20/2013",
499             EDGE = "12/20/2013")
500     public void format_be_by() throws Exception {
501         test("new Intl.DateTimeFormat('be-BY').format(date)");
502     }
503 
504     /**
505      * @throws Exception if the test fails
506      */
507     @Test
508     @Alerts("20.12.2013 \u0433.")
509     public void format_bg() throws Exception {
510         test("new Intl.DateTimeFormat('bg').format(date)");
511     }
512 
513     /**
514      * @throws Exception if the test fails
515      */
516     @Test
517     @Alerts("20.12.2013 \u0433.")
518     public void format_bg_bg() throws Exception {
519         test("new Intl.DateTimeFormat('bg-BG').format(date)");
520     }
521 
522     /**
523      * @throws Exception if the test fails
524      */
525     @Test
526     @Alerts("20/12/2013")
527     public void format_ca() throws Exception {
528         test("new Intl.DateTimeFormat('ca').format(date)");
529     }
530 
531     /**
532      * @throws Exception if the test fails
533      */
534     @Test
535     @Alerts("20/12/2013")
536     public void format_ca_es() throws Exception {
537         test("new Intl.DateTimeFormat('ca-ES').format(date)");
538     }
539 
540     /**
541      * @throws Exception if the test fails
542      */
543     @Test
544     @Alerts("20. 12. 2013")
545     public void format_cs() throws Exception {
546         test("new Intl.DateTimeFormat('cs').format(date)");
547     }
548 
549     /**
550      * @throws Exception if the test fails
551      */
552     @Test
553     @Alerts("20. 12. 2013")
554     public void format_cs_cz() throws Exception {
555         test("new Intl.DateTimeFormat('cs-CZ').format(date)");
556     }
557 
558     /**
559      * @throws Exception if the test fails
560      */
561     @Test
562     @Alerts("20.12.2013")
563     public void format_da() throws Exception {
564         test("new Intl.DateTimeFormat('da').format(date)");
565     }
566 
567     /**
568      * @throws Exception if the test fails
569      */
570     @Test
571     @Alerts("20.12.2013")
572     public void format_da_dk() throws Exception {
573         test("new Intl.DateTimeFormat('da-DK').format(date)");
574     }
575 
576     /**
577      * @throws Exception if the test fails
578      */
579     @Test
580     @Alerts("20.12.2013")
581     public void format_de() throws Exception {
582         test("new Intl.DateTimeFormat('de').format(date)");
583     }
584 
585     /**
586      * @throws Exception if the test fails
587      */
588     @Test
589     @Alerts("20.12.2013")
590     public void format_de_at() throws Exception {
591         test("new Intl.DateTimeFormat('de-AT').format(date)");
592     }
593 
594     /**
595      * @throws Exception if the test fails
596      */
597     @Test
598     @Alerts("20.12.2013")
599     public void format_de_ch() throws Exception {
600         test("new Intl.DateTimeFormat('de-CH').format(date)");
601     }
602 
603     /**
604      * @throws Exception if the test fails
605      */
606     @Test
607     @Alerts("20.12.2013")
608     public void format_de_de() throws Exception {
609         test("new Intl.DateTimeFormat('de-DE').format(date)");
610     }
611 
612     /**
613      * @throws Exception if the test fails
614      */
615     @Test
616     @Alerts("20.12.2013")
617     public void format_de_lu() throws Exception {
618         test("new Intl.DateTimeFormat('de-LU').format(date)");
619     }
620 
621     /**
622      * @throws Exception if the test fails
623      */
624     @Test
625     @Alerts("20/12/2013")
626     public void format_el() throws Exception {
627         test("new Intl.DateTimeFormat('el').format(date)");
628     }
629 
630     /**
631      * @throws Exception if the test fails
632      */
633     @Test
634     @Alerts("20/12/2013")
635     public void format_el_cy() throws Exception {
636         test("new Intl.DateTimeFormat('el-CY').format(date)");
637     }
638 
639     /**
640      * @throws Exception if the test fails
641      */
642     @Test
643     @Alerts("20/12/2013")
644     public void format_el_gr() throws Exception {
645         test("new Intl.DateTimeFormat('el-GR').format(date)");
646     }
647 
648     /**
649      * @throws Exception if the test fails
650      */
651     @Test
652     @Alerts("12/20/2013")
653     public void format_en() throws Exception {
654         test("new Intl.DateTimeFormat('en').format(date)");
655     }
656 
657     /**
658      * @throws Exception if the test fails
659      */
660     @Test
661     @Alerts("20/12/2013")
662     public void format_en_au() throws Exception {
663         test("new Intl.DateTimeFormat('en-AU').format(date)");
664     }
665 
666     /**
667      * @throws Exception if the test fails
668      */
669     @Test
670     @Alerts("2013-12-20")
671     public void format_en_ca() throws Exception {
672         test("new Intl.DateTimeFormat('en-CA').format(date)");
673     }
674 
675     /**
676      * @throws Exception if the test fails
677      */
678     @Test
679     @Alerts("20/12/2013")
680     public void format_en_gb() throws Exception {
681         test("new Intl.DateTimeFormat('en-GB').format(date)");
682     }
683 
684     /**
685      * @throws Exception if the test fails
686      */
687     @Test
688     @Alerts("20/12/2013")
689     public void format_en_ie() throws Exception {
690         test("new Intl.DateTimeFormat('en-IE').format(date)");
691     }
692 
693     /**
694      * @throws Exception if the test fails
695      */
696     @Test
697     @Alerts("20/12/2013")
698     public void format_en_in() throws Exception {
699         test("new Intl.DateTimeFormat('en-IN').format(date)");
700     }
701 
702     /**
703      * @throws Exception if the test fails
704      */
705     @Test
706     @Alerts("20/12/2013")
707     public void format_en_mt() throws Exception {
708         test("new Intl.DateTimeFormat('en-MT').format(date)");
709     }
710 
711     /**
712      * @throws Exception if the test fails
713      */
714     @Test
715     @Alerts("20/12/2013")
716     public void format_en_nz() throws Exception {
717         test("new Intl.DateTimeFormat('en-NZ').format(date)");
718     }
719 
720     /**
721      * @throws Exception if the test fails
722      */
723     @Test
724     @Alerts("12/20/2013")
725     public void format_en_ph() throws Exception {
726         test("new Intl.DateTimeFormat('en-PH').format(date)");
727     }
728 
729     /**
730      * @throws Exception if the test fails
731      */
732     @Test
733     @Alerts("20/12/2013")
734     public void format_en_sg() throws Exception {
735         test("new Intl.DateTimeFormat('en-SG').format(date)");
736     }
737 
738     /**
739      * @throws Exception if the test fails
740      */
741     @Test
742     @Alerts("12/20/2013")
743     public void format_en_us() throws Exception {
744         test("new Intl.DateTimeFormat('en-US').format(date)");
745     }
746 
747     /**
748      * @throws Exception if the test fails
749      */
750     @Test
751     @Alerts("2013/12/20")
752     public void format_en_za() throws Exception {
753         test("new Intl.DateTimeFormat('en-ZA').format(date)");
754     }
755 
756     /**
757      * @throws Exception if the test fails
758      */
759     @Test
760     @Alerts("20/12/2013")
761     public void format_es() throws Exception {
762         test("new Intl.DateTimeFormat('es').format(date)");
763     }
764 
765     /**
766      * @throws Exception if the test fails
767      */
768     @Test
769     @Alerts("20/12/2013")
770     public void format_es_ar() throws Exception {
771         test("new Intl.DateTimeFormat('es-AR').format(date)");
772     }
773 
774     /**
775      * @throws Exception if the test fails
776      */
777     @Test
778     @Alerts("20/12/2013")
779     public void format_es_bo() throws Exception {
780         test("new Intl.DateTimeFormat('es-BO').format(date)");
781     }
782 
783     /**
784      * @throws Exception if the test fails
785      */
786     @Test
787     @Alerts("20-12-2013")
788     public void format_es_cl() throws Exception {
789         test("new Intl.DateTimeFormat('es-CL').format(date)");
790     }
791 
792     /**
793      * @throws Exception if the test fails
794      */
795     @Test
796     @Alerts("20/12/2013")
797     public void format_es_co() throws Exception {
798         test("new Intl.DateTimeFormat('es-CO').format(date)");
799     }
800 
801     /**
802      * @throws Exception if the test fails
803      */
804     @Test
805     @Alerts("20/12/2013")
806     public void format_es_cr() throws Exception {
807         test("new Intl.DateTimeFormat('es-CR').format(date)");
808     }
809 
810     /**
811      * @throws Exception if the test fails
812      */
813     @Test
814     @Alerts("20/12/2013")
815     public void format_es_do() throws Exception {
816         test("new Intl.DateTimeFormat('es-DO').format(date)");
817     }
818 
819     /**
820      * @throws Exception if the test fails
821      */
822     @Test
823     @Alerts("20/12/2013")
824     public void format_es_ec() throws Exception {
825         test("new Intl.DateTimeFormat('es-EC').format(date)");
826     }
827 
828     /**
829      * @throws Exception if the test fails
830      */
831     @Test
832     @Alerts("20/12/2013")
833     public void format_es_es() throws Exception {
834         test("new Intl.DateTimeFormat('es-ES').format(date)");
835     }
836 
837     /**
838      * @throws Exception if the test fails
839      */
840     @Test
841     @Alerts("20/12/2013")
842     public void format_es_gt() throws Exception {
843         test("new Intl.DateTimeFormat('es-GT').format(date)");
844     }
845 
846     /**
847      * @throws Exception if the test fails
848      */
849     @Test
850     @Alerts("20/12/2013")
851     public void format_es_hn() throws Exception {
852         test("new Intl.DateTimeFormat('es-HN').format(date)");
853     }
854 
855     /**
856      * @throws Exception if the test fails
857      */
858     @Test
859     @Alerts("20/12/2013")
860     public void format_es_mx() throws Exception {
861         test("new Intl.DateTimeFormat('es-MX').format(date)");
862     }
863 
864     /**
865      * @throws Exception if the test fails
866      */
867     @Test
868     @Alerts("20/12/2013")
869     public void format_es_ni() throws Exception {
870         test("new Intl.DateTimeFormat('es-NI').format(date)");
871     }
872 
873     /**
874      * @throws Exception if the test fails
875      */
876     @Test
877     @Alerts("12/20/2013")
878     public void format_es_pa() throws Exception {
879         test("new Intl.DateTimeFormat('es-PA').format(date)");
880     }
881 
882     /**
883      * @throws Exception if the test fails
884      */
885     @Test
886     @Alerts("20/12/2013")
887     public void format_es_pe() throws Exception {
888         test("new Intl.DateTimeFormat('es-PE').format(date)");
889     }
890 
891     /**
892      * @throws Exception if the test fails
893      */
894     @Test
895     @Alerts("12/20/2013")
896     public void format_es_pr() throws Exception {
897         test("new Intl.DateTimeFormat('es-PR').format(date)");
898     }
899 
900     /**
901      * @throws Exception if the test fails
902      */
903     @Test
904     @Alerts("20/12/2013")
905     public void format_es_py() throws Exception {
906         test("new Intl.DateTimeFormat('es-PY').format(date)");
907     }
908 
909     /**
910      * @throws Exception if the test fails
911      */
912     @Test
913     @Alerts("20/12/2013")
914     public void format_es_sv() throws Exception {
915         test("new Intl.DateTimeFormat('es-SV').format(date)");
916     }
917 
918     /**
919      * @throws Exception if the test fails
920      */
921     @Test
922     @Alerts("20/12/2013")
923     public void format_es_us() throws Exception {
924         test("new Intl.DateTimeFormat('es-US').format(date)");
925     }
926 
927     /**
928      * @throws Exception if the test fails
929      */
930     @Test
931     @Alerts("20/12/2013")
932     public void format_es_uy() throws Exception {
933         test("new Intl.DateTimeFormat('es-UY').format(date)");
934     }
935 
936     /**
937      * @throws Exception if the test fails
938      */
939     @Test
940     @Alerts("20/12/2013")
941     public void format_es_ve() throws Exception {
942         test("new Intl.DateTimeFormat('es-VE').format(date)");
943     }
944 
945     /**
946      * @throws Exception if the test fails
947      */
948     @Test
949     @Alerts("20.12.2013")
950     public void format_et() throws Exception {
951         test("new Intl.DateTimeFormat('et').format(date)");
952     }
953 
954     /**
955      * @throws Exception if the test fails
956      */
957     @Test
958     @Alerts("20.12.2013")
959     public void format_et_ee() throws Exception {
960         test("new Intl.DateTimeFormat('et-EE').format(date)");
961     }
962 
963     /**
964      * @throws Exception if the test fails
965      */
966     @Test
967     @Alerts("20.12.2013")
968     public void format_fi() throws Exception {
969         test("new Intl.DateTimeFormat('fi').format(date)");
970     }
971 
972     /**
973      * @throws Exception if the test fails
974      */
975     @Test
976     @Alerts("20.12.2013")
977     public void format_fi_fi() throws Exception {
978         test("new Intl.DateTimeFormat('fi-FI').format(date)");
979     }
980 
981     /**
982      * @throws Exception if the test fails
983      */
984     @Test
985     @Alerts("20/12/2013")
986     public void format_fr() throws Exception {
987         test("new Intl.DateTimeFormat('fr').format(date)");
988     }
989 
990     /**
991      * @throws Exception if the test fails
992      */
993     @Test
994     @Alerts("20/12/2013")
995     public void format_fr_be() throws Exception {
996         test("new Intl.DateTimeFormat('fr-BE').format(date)");
997     }
998 
999     /**
1000      * @throws Exception if the test fails
1001      */
1002     @Test
1003     @Alerts("2013-12-20")
1004     public void format_fr_ca() throws Exception {
1005         test("new Intl.DateTimeFormat('fr-CA').format(date)");
1006     }
1007 
1008     /**
1009      * @throws Exception if the test fails
1010      */
1011     @Test
1012     @Alerts("20.12.2013")
1013     public void format_fr_ch() throws Exception {
1014         test("new Intl.DateTimeFormat('fr-CH').format(date)");
1015     }
1016 
1017     /**
1018      * @throws Exception if the test fails
1019      */
1020     @Test
1021     @Alerts("20/12/2013")
1022     public void format_fr_fr() throws Exception {
1023         test("new Intl.DateTimeFormat('fr-FR').format(date)");
1024     }
1025 
1026     /**
1027      * @throws Exception if the test fails
1028      */
1029     @Test
1030     @Alerts("20/12/2013")
1031     public void format_fr_lu() throws Exception {
1032         test("new Intl.DateTimeFormat('fr-LU').format(date)");
1033     }
1034 
1035     /**
1036      * @throws Exception if the test fails
1037      */
1038     @Test
1039     @Alerts(DEFAULT = "20/12/2013",
1040             CHROME = "12/20/2013",
1041             EDGE = "12/20/2013")
1042     public void format_ga() throws Exception {
1043         test("new Intl.DateTimeFormat('ga').format(date)");
1044     }
1045 
1046     /**
1047      * @throws Exception if the test fails
1048      */
1049     @Test
1050     @Alerts(DEFAULT = "20/12/2013",
1051             CHROME = "12/20/2013",
1052             EDGE = "12/20/2013")
1053     public void format_ga_ie() throws Exception {
1054         test("new Intl.DateTimeFormat('ga-IE').format(date)");
1055     }
1056 
1057     /**
1058      * @throws Exception if the test fails
1059      */
1060     @Test
1061     @Alerts("20/12/2013")
1062     public void format_hi_in() throws Exception {
1063         test("new Intl.DateTimeFormat('hi-IN').format(date)");
1064     }
1065 
1066     /**
1067      * @throws Exception if the test fails
1068      */
1069     @Test
1070     @Alerts("20. 12. 2013.")
1071     public void format_hr() throws Exception {
1072         test("new Intl.DateTimeFormat('hr').format(date)");
1073     }
1074 
1075     /**
1076      * @throws Exception if the test fails
1077      */
1078     @Test
1079     @Alerts("20. 12. 2013.")
1080     public void format_hr_hr() throws Exception {
1081         test("new Intl.DateTimeFormat('hr-HR').format(date)");
1082     }
1083 
1084     /**
1085      * @throws Exception if the test fails
1086      */
1087     @Test
1088     @Alerts("2013. 12. 20.")
1089     public void format_hu() throws Exception {
1090         test("new Intl.DateTimeFormat('hu').format(date)");
1091     }
1092 
1093     /**
1094      * @throws Exception if the test fails
1095      */
1096     @Test
1097     @Alerts("2013. 12. 20.")
1098     public void format_hu_hu() throws Exception {
1099         test("new Intl.DateTimeFormat('hu-HU').format(date)");
1100     }
1101 
1102     /**
1103      * @throws Exception if the test fails
1104      */
1105     @Test
1106     @Alerts("20/12/2013")
1107     public void format_in() throws Exception {
1108         test("new Intl.DateTimeFormat('in').format(date)");
1109     }
1110 
1111     /**
1112      * @throws Exception if the test fails
1113      */
1114     @Test
1115     @Alerts("20/12/2013")
1116     public void format_in_id() throws Exception {
1117         test("new Intl.DateTimeFormat('in-ID').format(date)");
1118     }
1119 
1120     /**
1121      * @throws Exception if the test fails
1122      */
1123     @Test
1124     @Alerts(DEFAULT = "20.12.2013",
1125             CHROME = "12/20/2013",
1126             EDGE = "12/20/2013")
1127     public void format_is() throws Exception {
1128         test("new Intl.DateTimeFormat('is').format(date)");
1129     }
1130 
1131     /**
1132      * @throws Exception if the test fails
1133      */
1134     @Test
1135     @Alerts(DEFAULT = "20.12.2013",
1136             CHROME = "12/20/2013",
1137             EDGE = "12/20/2013")
1138     public void format_is_is() throws Exception {
1139         test("new Intl.DateTimeFormat('is-IS').format(date)");
1140     }
1141 
1142     /**
1143      * @throws Exception if the test fails
1144      */
1145     @Test
1146     @Alerts("20/12/2013")
1147     public void format_it() throws Exception {
1148         test("new Intl.DateTimeFormat('it').format(date)");
1149     }
1150 
1151     /**
1152      * @throws Exception if the test fails
1153      */
1154     @Test
1155     @Alerts("20/12/2013")
1156     public void format_it_ch() throws Exception {
1157         test("new Intl.DateTimeFormat('it-CH').format(date)");
1158     }
1159 
1160     /**
1161      * @throws Exception if the test fails
1162      */
1163     @Test
1164     @Alerts("20/12/2013")
1165     public void format_it_it() throws Exception {
1166         test("new Intl.DateTimeFormat('it-IT').format(date)");
1167     }
1168 
1169     /**
1170      * @throws Exception if the test fails
1171      */
1172     @Test
1173     @Alerts("20.12.2013")
1174     public void format_iw() throws Exception {
1175         test("new Intl.DateTimeFormat('iw').format(date)");
1176     }
1177 
1178     /**
1179      * @throws Exception if the test fails
1180      */
1181     @Test
1182     @Alerts("20.12.2013")
1183     public void format_iw_il() throws Exception {
1184         test("new Intl.DateTimeFormat('iw-IL').format(date)");
1185     }
1186 
1187     /**
1188      * @throws Exception if the test fails
1189      */
1190     @Test
1191     @Alerts("2013/12/20")
1192     public void format_ja() throws Exception {
1193         test("new Intl.DateTimeFormat('ja').format(date)");
1194     }
1195 
1196     /**
1197      * @throws Exception if the test fails
1198      */
1199     @Test
1200     @Alerts("2013/12/20")
1201     public void format_ja_jp() throws Exception {
1202         test("new Intl.DateTimeFormat('ja-JP').format(date)");
1203     }
1204 
1205     /**
1206      * @throws Exception if the test fails
1207      */
1208     @Test
1209     @Alerts("2013. 12. 20.")
1210     public void format_ko() throws Exception {
1211         test("new Intl.DateTimeFormat('ko').format(date)");
1212     }
1213 
1214     /**
1215      * @throws Exception if the test fails
1216      */
1217     @Test
1218     @Alerts("2013. 12. 20.")
1219     public void format_ko_kr() throws Exception {
1220         test("new Intl.DateTimeFormat('ko-KR').format(date)");
1221     }
1222 
1223     /**
1224      * @throws Exception if the test fails
1225      */
1226     @Test
1227     @Alerts("2013-12-20")
1228     public void format_lt() throws Exception {
1229         test("new Intl.DateTimeFormat('lt').format(date)");
1230     }
1231 
1232     /**
1233      * @throws Exception if the test fails
1234      */
1235     @Test
1236     @Alerts("2013-12-20")
1237     public void format_lt_lt() throws Exception {
1238         test("new Intl.DateTimeFormat('lt-LT').format(date)");
1239     }
1240 
1241     /**
1242      * @throws Exception if the test fails
1243      */
1244     @Test
1245     @Alerts("20.12.2013.")
1246     public void format_lv() throws Exception {
1247         test("new Intl.DateTimeFormat('lv').format(date)");
1248     }
1249 
1250     /**
1251      * @throws Exception if the test fails
1252      */
1253     @Test
1254     @Alerts("20.12.2013.")
1255     public void format_lv_lv() throws Exception {
1256         test("new Intl.DateTimeFormat('lv-LV').format(date)");
1257     }
1258 
1259     /**
1260      * @throws Exception if the test fails
1261      */
1262     @Test
1263     @Alerts(DEFAULT = "12/20/2013",
1264             FF = "20.12.2013 \u0433.",
1265             FF_ESR = "20.12.2013")
1266     public void format_mk() throws Exception {
1267         test("new Intl.DateTimeFormat('mk').format(date)");
1268     }
1269 
1270     /**
1271      * @throws Exception if the test fails
1272      */
1273     @Test
1274     @Alerts(DEFAULT = "12/20/2013",
1275             FF = "20.12.2013 \u0433.",
1276             FF_ESR = "20.12.2013")
1277     public void format_mk_mk() throws Exception {
1278         test("new Intl.DateTimeFormat('mk-MK').format(date)");
1279     }
1280 
1281     /**
1282      * @throws Exception if the test fails
1283      */
1284     @Test
1285     @Alerts("20/12/2013")
1286     public void format_ms() throws Exception {
1287         test("new Intl.DateTimeFormat('ms').format(date)");
1288     }
1289 
1290     /**
1291      * @throws Exception if the test fails
1292      */
1293     @Test
1294     @Alerts("20/12/2013")
1295     public void format_ms_my() throws Exception {
1296         test("new Intl.DateTimeFormat('ms-MY').format(date)");
1297     }
1298 
1299     /**
1300      * @throws Exception if the test fails
1301      */
1302     @Test
1303     @Alerts("12/20/2013")
1304     public void format_mt() throws Exception {
1305         test("new Intl.DateTimeFormat('mt').format(date)");
1306     }
1307 
1308     /**
1309      * @throws Exception if the test fails
1310      */
1311     @Test
1312     @Alerts("12/20/2013")
1313     public void format_mt_mt() throws Exception {
1314         test("new Intl.DateTimeFormat('mt-MT').format(date)");
1315     }
1316 
1317     /**
1318      * @throws Exception if the test fails
1319      */
1320     @Test
1321     @Alerts("20-12-2013")
1322     public void format_nl() throws Exception {
1323         test("new Intl.DateTimeFormat('nl').format(date)");
1324     }
1325 
1326     /**
1327      * @throws Exception if the test fails
1328      */
1329     @Test
1330     @Alerts("20/12/2013")
1331     public void format_nl_be() throws Exception {
1332         test("new Intl.DateTimeFormat('nl-BE').format(date)");
1333     }
1334 
1335     /**
1336      * @throws Exception if the test fails
1337      */
1338     @Test
1339     @Alerts("20-12-2013")
1340     public void format_nl_nl() throws Exception {
1341         test("new Intl.DateTimeFormat('nl-NL').format(date)");
1342     }
1343 
1344     /**
1345      * @throws Exception if the test fails
1346      */
1347     @Test
1348     @Alerts("20.12.2013")
1349     public void format_no() throws Exception {
1350         test("new Intl.DateTimeFormat('no').format(date)");
1351     }
1352 
1353     /**
1354      * @throws Exception if the test fails
1355      */
1356     @Test
1357     @Alerts("20.12.2013")
1358     public void format_no_no() throws Exception {
1359         test("new Intl.DateTimeFormat('no-NO').format(date)");
1360     }
1361 
1362     /**
1363      * @throws Exception if the test fails
1364      */
1365     @Test
1366     @Alerts("RangeError")
1367     public void format_no_no_ny() throws Exception {
1368         test("new Intl.DateTimeFormat('no-NO-NY').format(date)");
1369     }
1370 
1371     /**
1372      * @throws Exception if the test fails
1373      */
1374     @Test
1375     @Alerts("20.12.2013")
1376     public void format_pl() throws Exception {
1377         test("new Intl.DateTimeFormat('pl').format(date)");
1378     }
1379 
1380     /**
1381      * @throws Exception if the test fails
1382      */
1383     @Test
1384     @Alerts("20.12.2013")
1385     public void format_pl_pl() throws Exception {
1386         test("new Intl.DateTimeFormat('pl-PL').format(date)");
1387     }
1388 
1389     /**
1390      * @throws Exception if the test fails
1391      */
1392     @Test
1393     @Alerts("20/12/2013")
1394     public void format_pt() throws Exception {
1395         test("new Intl.DateTimeFormat('pt').format(date)");
1396     }
1397 
1398     /**
1399      * @throws Exception if the test fails
1400      */
1401     @Test
1402     @Alerts("20/12/2013")
1403     public void format_pt_br() throws Exception {
1404         test("new Intl.DateTimeFormat('pt-BR').format(date)");
1405     }
1406 
1407     /**
1408      * @throws Exception if the test fails
1409      */
1410     @Test
1411     @Alerts("20/12/2013")
1412     public void format_pt_pt() throws Exception {
1413         test("new Intl.DateTimeFormat('pt-PT').format(date)");
1414     }
1415 
1416     /**
1417      * @throws Exception if the test fails
1418      */
1419     @Test
1420     @Alerts("20.12.2013")
1421     public void format_ro() throws Exception {
1422         test("new Intl.DateTimeFormat('ro').format(date)");
1423     }
1424 
1425     /**
1426      * @throws Exception if the test fails
1427      */
1428     @Test
1429     @Alerts("20.12.2013")
1430     public void format_ro_ro() throws Exception {
1431         test("new Intl.DateTimeFormat('ro-RO').format(date)");
1432     }
1433 
1434     /**
1435      * @throws Exception if the test fails
1436      */
1437     @Test
1438     @Alerts("20.12.2013")
1439     public void format_ru() throws Exception {
1440         test("new Intl.DateTimeFormat('ru').format(date)");
1441     }
1442 
1443     /**
1444      * @throws Exception if the test fails
1445      */
1446     @Test
1447     @Alerts("20.12.2013")
1448     public void format_ru_ru() throws Exception {
1449         test("new Intl.DateTimeFormat('ru-RU').format(date)");
1450     }
1451 
1452     /**
1453      * @throws Exception if the test fails
1454      */
1455     @Test
1456     @Alerts("20. 12. 2013")
1457     public void format_sk() throws Exception {
1458         test("new Intl.DateTimeFormat('sk').format(date)");
1459     }
1460 
1461     /**
1462      * @throws Exception if the test fails
1463      */
1464     @Test
1465     @Alerts("20. 12. 2013")
1466     public void format_sk_sk() throws Exception {
1467         test("new Intl.DateTimeFormat('sk-SK').format(date)");
1468     }
1469 
1470     /**
1471      * @throws Exception if the test fails
1472      */
1473     @Test
1474     @Alerts("20. 12. 2013")
1475     public void format_sl() throws Exception {
1476         test("new Intl.DateTimeFormat('sl').format(date)");
1477     }
1478 
1479     /**
1480      * @throws Exception if the test fails
1481      */
1482     @Test
1483     @Alerts("20. 12. 2013")
1484     public void format_sl_si() throws Exception {
1485         test("new Intl.DateTimeFormat('sl-SI').format(date)");
1486     }
1487 
1488     /**
1489      * @throws Exception if the test fails
1490      */
1491     @Test
1492     @Alerts(DEFAULT = "20.12.2013",
1493             CHROME = "12/20/2013")
1494     public void format_sq() throws Exception {
1495         test("new Intl.DateTimeFormat('sq').format(date)");
1496     }
1497 
1498     /**
1499      * @throws Exception if the test fails
1500      */
1501     @Test
1502     @Alerts(DEFAULT = "20.12.2013",
1503             CHROME = "12/20/2013")
1504     public void format_sq_al() throws Exception {
1505         test("new Intl.DateTimeFormat('sq-AL').format(date)");
1506     }
1507 
1508     /**
1509      * @throws Exception if the test fails
1510      */
1511     @Test
1512     @Alerts("20. 12. 2013.")
1513     public void format_sr() throws Exception {
1514         test("new Intl.DateTimeFormat('sr').format(date)");
1515     }
1516 
1517     /**
1518      * @throws Exception if the test fails
1519      */
1520     @Test
1521     @Alerts("20. 12. 2013.")
1522     public void format_sr_ba() throws Exception {
1523         test("new Intl.DateTimeFormat('sr-BA').format(date)");
1524     }
1525 
1526     /**
1527      * @throws Exception if the test fails
1528      */
1529     @Test
1530     @Alerts("20. 12. 2013.")
1531     public void format_sr_cs() throws Exception {
1532         test("new Intl.DateTimeFormat('sr-CS').format(date)");
1533     }
1534 
1535     /**
1536      * @throws Exception if the test fails
1537      */
1538     @Test
1539     @Alerts("20. 12. 2013.")
1540     public void format_sr_me() throws Exception {
1541         test("new Intl.DateTimeFormat('sr-ME').format(date)");
1542     }
1543 
1544     /**
1545      * @throws Exception if the test fails
1546      */
1547     @Test
1548     @Alerts("20. 12. 2013.")
1549     public void format_sr_rs() throws Exception {
1550         test("new Intl.DateTimeFormat('sr-RS').format(date)");
1551     }
1552 
1553     /**
1554      * @throws Exception if the test fails
1555      */
1556     @Test
1557     @Alerts("2013-12-20")
1558     public void format_sv() throws Exception {
1559         test("new Intl.DateTimeFormat('sv').format(date)");
1560     }
1561 
1562     /**
1563      * @throws Exception if the test fails
1564      */
1565     @Test
1566     @Alerts("2013-12-20")
1567     public void format_sv_se() throws Exception {
1568         test("new Intl.DateTimeFormat('sv-SE').format(date)");
1569     }
1570 
1571     /**
1572      * @throws Exception if the test fails
1573      */
1574     @Test
1575     @Alerts("20/12/2556")
1576     public void format_th() throws Exception {
1577         test("new Intl.DateTimeFormat('th').format(date)");
1578     }
1579 
1580     /**
1581      * @throws Exception if the test fails
1582      */
1583     @Test
1584     @Alerts("20/12/2556")
1585     public void format_th_th() throws Exception {
1586         test("new Intl.DateTimeFormat('th-TH').format(date)");
1587     }
1588 
1589     /**
1590      * @throws Exception if the test fails
1591      */
1592     @Test
1593     @Alerts("20.12.2013")
1594     public void format_tr() throws Exception {
1595         test("new Intl.DateTimeFormat('tr').format(date)");
1596     }
1597 
1598     /**
1599      * @throws Exception if the test fails
1600      */
1601     @Test
1602     @Alerts("20.12.2013")
1603     public void format_tr_tr() throws Exception {
1604         test("new Intl.DateTimeFormat('tr-TR').format(date)");
1605     }
1606 
1607     /**
1608      * @throws Exception if the test fails
1609      */
1610     @Test
1611     @Alerts("20.12.2013")
1612     public void format_uk() throws Exception {
1613         test("new Intl.DateTimeFormat('uk').format(date)");
1614     }
1615 
1616     /**
1617      * @throws Exception if the test fails
1618      */
1619     @Test
1620     @Alerts("20.12.2013")
1621     public void format_uk_ua() throws Exception {
1622         test("new Intl.DateTimeFormat('uk-UA').format(date)");
1623     }
1624 
1625     /**
1626      * @throws Exception if the test fails
1627      */
1628     @Test
1629     @Alerts("20/12/2013")
1630     public void format_vi() throws Exception {
1631         test("new Intl.DateTimeFormat('vi').format(date)");
1632     }
1633 
1634     /**
1635      * @throws Exception if the test fails
1636      */
1637     @Test
1638     @Alerts("20/12/2013")
1639     public void format_vi_vn() throws Exception {
1640         test("new Intl.DateTimeFormat('vi-VN').format(date)");
1641     }
1642 
1643     /**
1644      * @throws Exception if the test fails
1645      */
1646     @Test
1647     @Alerts("2013/12/20")
1648     public void format_zh() throws Exception {
1649         test("new Intl.DateTimeFormat('zh').format(date)");
1650     }
1651 
1652     /**
1653      * @throws Exception if the test fails
1654      */
1655     @Test
1656     @Alerts("2013/12/20")
1657     public void format_zh_cn() throws Exception {
1658         test("new Intl.DateTimeFormat('zh-CN').format(date)");
1659     }
1660 
1661     /**
1662      * @throws Exception if the test fails
1663      */
1664     @Test
1665     @Alerts("20/12/2013")
1666     public void format_zh_hk() throws Exception {
1667         test("new Intl.DateTimeFormat('zh-HK').format(date)");
1668     }
1669 
1670     /**
1671      * @throws Exception if the test fails
1672      */
1673     @Test
1674     @Alerts("2013\u5E7412\u670820\u65E5")
1675     public void format_zh_sg() throws Exception {
1676         test("new Intl.DateTimeFormat('zh-SG').format(date)");
1677     }
1678 
1679     /**
1680      * @throws Exception if the test fails
1681      */
1682     @Test
1683     @Alerts("2013/12/20")
1684     public void format_zh_tw() throws Exception {
1685         test("new Intl.DateTimeFormat('zh-TW').format(date)");
1686     }
1687 }