-
Notifications
You must be signed in to change notification settings - Fork 68
/
monday_test.go
558 lines (489 loc) · 39.3 KB
/
monday_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
package monday
import (
"fmt"
"testing"
"time"
)
type FormatTest struct {
locale Locale
date time.Time
layout string
expected string
}
var formatTests = []FormatTest{
{LocaleEnUS, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "Tue Sep 3 2013"},
{LocaleEnUS, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "Wednesday Sep 4 2013"},
{LocaleEnUS, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "Thursday October 03 2013"},
{LocaleEnUS, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "Sunday. 3 November 2013"},
{LocaleEnUS, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 May. Monday"},
{LocaleEnUS, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 May 2013"},
{LocaleEnUS, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "May"},
{LocaleEnUS, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 May"},
{LocaleEnGB, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "Tue Sep 3 2013"},
{LocaleEnGB, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "Wednesday Sep 4 2013"},
{LocaleEnGB, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "Thursday October 03 2013"},
{LocaleEnGB, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "Sunday. 3 November 2013"},
{LocaleEnGB, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 May. Monday"},
{LocaleEnGB, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 May 2013"},
{LocaleEnGB, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "May"},
{LocaleEnGB, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 May"},
{LocaleDaDK, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "tir sep 3 2013"},
{LocaleDaDK, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "onsdag sep 4 2013"},
{LocaleDaDK, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "torsdag oktober 03 2013"},
{LocaleDaDK, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "søndag. 3 november 2013"},
{LocaleDaDK, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 maj. mandag"},
{LocaleDaDK, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 maj 2013"},
{LocaleDaDK, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "maj"},
{LocaleDaDK, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 maj"},
{LocaleNlBE, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "di sep 3 2013"},
{LocaleNlBE, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "woensdag sep 4 2013"},
{LocaleNlBE, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "donderdag oktober 03 2013"},
{LocaleNlBE, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "zondag. 3 november 2013"},
{LocaleNlBE, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 mei. maandag"},
{LocaleNlBE, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 mei 2013"},
{LocaleNlBE, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "mei"},
{LocaleNlBE, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 mei"},
{LocaleNlNL, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "di sep 3 2013"},
{LocaleNlNL, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "woensdag sep 4 2013"},
{LocaleNlNL, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "donderdag oktober 03 2013"},
{LocaleNlNL, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "zondag. 3 november 2013"},
{LocaleNlNL, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 mei. maandag"},
{LocaleNlNL, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 mei 2013"},
{LocaleNlNL, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "mei"},
{LocaleNlNL, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 mei"},
{LocaleFiFI, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "ti syys 3 2013"},
{LocaleFiFI, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "keskiviikko syys 4 2013"},
{LocaleFiFI, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "torstai lokakuu 03 2013"},
{LocaleFiFI, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "sunnuntai. 3 marraskuuta 2013"},
{LocaleFiFI, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 toukokuuta. maanantai"},
{LocaleFiFI, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 touko 2013"},
{LocaleFiFI, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "toukokuu"},
{LocaleFiFI, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 toukokuuta"},
{LocaleFrFR, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "mar sept 3 2013"},
{LocaleFrFR, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "mercredi sept 4 2013"},
{LocaleFrFR, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "jeudi octobre 03 2013"},
{LocaleFrFR, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "dimanche. 3 novembre 2013"},
{LocaleFrFR, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 mai. lundi"},
{LocaleFrFR, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 mai 2013"},
{LocaleFrFR, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "mai"},
{LocaleFrFR, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 mai"},
{LocaleFrCA, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "mar sept 3 2013"},
{LocaleFrCA, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "mercredi sept 4 2013"},
{LocaleFrCA, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "jeudi octobre 03 2013"},
{LocaleFrCA, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "dimanche. 3 novembre 2013"},
{LocaleFrCA, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 mai. lundi"},
{LocaleFrCA, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 mai 2013"},
{LocaleFrCA, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "mai"},
{LocaleFrCA, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 mai"},
{LocaleFrGP, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "mar sept 3 2013"},
{LocaleFrGP, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "mercredi sept 4 2013"},
{LocaleFrGP, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "jeudi octobre 03 2013"},
{LocaleFrGP, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "dimanche. 3 novembre 2013"},
{LocaleFrGP, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 mai. lundi"},
{LocaleFrGP, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 mai 2013"},
{LocaleFrGP, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "mai"},
{LocaleFrGP, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 mai"},
{LocaleFrLU, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "mar sept 3 2013"},
{LocaleFrLU, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "mercredi sept 4 2013"},
{LocaleFrLU, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "jeudi octobre 03 2013"},
{LocaleFrLU, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "dimanche. 3 novembre 2013"},
{LocaleFrLU, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 mai. lundi"},
{LocaleFrLU, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 mai 2013"},
{LocaleFrLU, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "mai"},
{LocaleFrLU, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 mai"},
{LocaleFrMQ, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "mar sept 3 2013"},
{LocaleFrMQ, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "mercredi sept 4 2013"},
{LocaleFrMQ, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "jeudi octobre 03 2013"},
{LocaleFrMQ, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "dimanche. 3 novembre 2013"},
{LocaleFrMQ, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 mai. lundi"},
{LocaleFrMQ, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 mai 2013"},
{LocaleFrMQ, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "mai"},
{LocaleFrMQ, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 mai"},
{LocaleFrGF, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "mar sept 3 2013"},
{LocaleFrGF, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "mercredi sept 4 2013"},
{LocaleFrGF, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "jeudi octobre 03 2013"},
{LocaleFrGF, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "dimanche. 3 novembre 2013"},
{LocaleFrGF, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 mai. lundi"},
{LocaleFrGF, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 mai 2013"},
{LocaleFrGF, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "mai"},
{LocaleFrGF, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 mai"},
{LocaleFrRE, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "mar sept 3 2013"},
{LocaleFrRE, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "mercredi sept 4 2013"},
{LocaleFrRE, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "jeudi octobre 03 2013"},
{LocaleFrRE, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "dimanche. 3 novembre 2013"},
{LocaleFrRE, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 mai. lundi"},
{LocaleFrRE, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 mai 2013"},
{LocaleFrRE, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "mai"},
{LocaleFrRE, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 mai"},
{LocaleDeDE, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "Di Sep 3 2013"},
{LocaleDeDE, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "Mittwoch Sep 4 2013"},
{LocaleDeDE, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "Donnerstag Oktober 03 2013"},
{LocaleDeDE, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "Sonntag. 3 November 2013"},
{LocaleDeDE, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 Mai. Montag"},
{LocaleDeDE, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 Mai 2013"},
{LocaleDeDE, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "Mai"},
{LocaleDeDE, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 Mai"},
{LocaleHuHU, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "K szept 3 2013"},
{LocaleHuHU, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "szerda szept 4 2013"},
{LocaleHuHU, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "csütörtök október 03 2013"},
{LocaleHuHU, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "vasárnap. 3 november 2013"},
{LocaleHuHU, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 május. hétfő"},
{LocaleHuHU, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 máj 2013"},
{LocaleHuHU, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "május"},
{LocaleHuHU, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 május"},
{LocaleItIT, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "mar set 3 2013"},
{LocaleItIT, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "mercoledì set 4 2013"},
{LocaleItIT, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "giovedì ottobre 03 2013"},
{LocaleItIT, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "domenica. 3 novembre 2013"},
{LocaleItIT, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 maggio. lunedì"},
{LocaleItIT, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 mag 2013"},
{LocaleItIT, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "maggio"},
{LocaleItIT, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 maggio"},
{LocaleNnNO, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "ty sep 3 2013"},
{LocaleNnNO, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "onsdag sep 4 2013"},
{LocaleNnNO, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "torsdag oktober 03 2013"},
{LocaleNnNO, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "søndag. 3 november 2013"},
{LocaleNnNO, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 mai. måndag"},
{LocaleNnNO, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 mai 2013"},
{LocaleNnNO, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "mai"},
{LocaleNnNO, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 mai"},
{LocaleNbNO, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "ti sep 3 2013"},
{LocaleNbNO, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "onsdag sep 4 2013"},
{LocaleNbNO, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "torsdag oktober 03 2013"},
{LocaleNbNO, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "søndag. 3 november 2013"},
{LocaleNbNO, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 mai. mandag"},
{LocaleNbNO, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 mai 2013"},
{LocaleNbNO, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "mai"},
{LocaleNbNO, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 mai"},
{LocalePlPL, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "Wto Wrz 3 2013"},
{LocalePlPL, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "Środa Wrz 4 2013"},
{LocalePlPL, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "Czwartek Październik 03 2013"},
{LocalePlPL, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "Niedziela. 3 listopada 2013"},
{LocalePlPL, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 maja. Poniedziałek"},
{LocalePlPL, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 maj 2013"},
{LocalePlPL, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "Maj"},
{LocalePlPL, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 maja"},
{LocalePtPT, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "ter Set 3 2013"},
{LocalePtPT, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "Quarta-feira Set 4 2013"},
{LocalePtPT, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "Quinta-feira Outubro 03 2013"},
{LocalePtPT, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "Domingo. 3 Novembro 2013"},
{LocalePtPT, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 Maio. Segunda-feira"},
{LocalePtPT, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 Mai 2013"},
{LocalePtPT, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "Maio"},
{LocalePtPT, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 Maio"},
{LocalePtBR, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "ter set 3 2013"},
{LocalePtBR, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "quarta-feira set 4 2013"},
{LocalePtBR, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "quinta-feira outubro 03 2013"},
{LocalePtBR, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "domingo. 3 novembro 2013"},
{LocalePtBR, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 maio. segunda-feira"},
{LocalePtBR, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 mai 2013"},
{LocalePtBR, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "maio"},
{LocalePtBR, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 maio"},
{LocaleRoRO, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "Ma sept 3 2013"},
{LocaleRoRO, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "miercuri sept 4 2013"},
{LocaleRoRO, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "joi octombrie 03 2013"},
{LocaleRoRO, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "duminică. 3 noiembrie 2013"},
{LocaleRoRO, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 mai. luni"},
{LocaleRoRO, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 mai 2013"},
{LocaleRoRO, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "mai"},
{LocaleRoRO, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 mai"},
{LocaleRuRU, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "Вт Сен 3 2013"},
{LocaleRuRU, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "Среда Сен 4 2013"},
{LocaleRuRU, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "Четверг Октябрь 03 2013"},
{LocaleRuRU, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "Воскресенье. 3 ноября 2013"},
{LocaleRuRU, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 мая. Понедельник"},
{LocaleRuRU, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 мая 2013"},
{LocaleRuRU, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "Май"},
{LocaleRuRU, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 мая"},
{LocaleEsES, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "mar sep 3 2013"},
{LocaleEsES, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "miércoles sep 4 2013"},
{LocaleEsES, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "jueves octubre 03 2013"},
{LocaleEsES, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "domingo. 3 noviembre 2013"},
{LocaleEsES, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 mayo. lunes"},
{LocaleEsES, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 may 2013"},
{LocaleEsES, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "mayo"},
{LocaleEsES, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 mayo"},
{LocaleCaES, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "dt set 3 2013"},
{LocaleCaES, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "dimecres set 4 2013"},
{LocaleCaES, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "dijous octubre 03 2013"},
{LocaleCaES, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "diumenge. 3 novembre 2013"},
{LocaleCaES, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 maig. dilluns"},
{LocaleCaES, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 maig 2013"},
{LocaleCaES, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "maig"},
{LocaleCaES, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 maig"},
{LocaleSvSE, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "tis sep 3 2013"},
{LocaleSvSE, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "onsdag sep 4 2013"},
{LocaleSvSE, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "torsdag oktober 03 2013"},
{LocaleSvSE, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "söndag. 3 november 2013"},
{LocaleSvSE, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 maj. måndag"},
{LocaleSvSE, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 maj 2013"},
{LocaleSvSE, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "maj"},
{LocaleSvSE, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 maj"},
{LocaleTrTR, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "Sal Eyl 3 2013"},
{LocaleTrTR, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "Çarşamba Eyl 4 2013"},
{LocaleTrTR, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "Perşembe Ekim 03 2013"},
{LocaleTrTR, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "Pazar. 3 Kasım 2013"},
{LocaleTrTR, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 Mayıs. Pazartesi"},
{LocaleTrTR, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 May 2013"},
{LocaleTrTR, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "Mayıs"},
{LocaleTrTR, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 Mayıs"},
{LocaleUkUA, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "Вт Вер 3 2013"},
{LocaleUkUA, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "Середа Вер 4 2013"},
{LocaleUkUA, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "Четвер Жовтень 03 2013"},
{LocaleUkUA, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "Неділя. 3 листопада 2013"},
{LocaleUkUA, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 травня. Понеділок"},
{LocaleUkUA, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 тра 2013"},
{LocaleUkUA, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "Травень"},
{LocaleUkUA, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 травня"},
{LocaleBgBG, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "Вт Сеп 3 2013"},
{LocaleBgBG, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "Сряда Сеп 4 2013"},
{LocaleBgBG, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "Четвъртък Октомври 03 2013"},
{LocaleBgBG, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "Неделя. 3 Ноември 2013"},
{LocaleBgBG, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 Май. Понеделник"},
{LocaleBgBG, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 Май 2013"},
{LocaleBgBG, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "Май"},
{LocaleBgBG, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 Май"},
{LocaleZhCN, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006-01-2", "2013-05-13"},
{LocaleZhCN, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006/1/2 Monday", "2013/5/13 星期一"},
{LocaleZhCN, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006年1月2日 Monday", "2013年5月13日 星期一"},
{LocaleZhCN, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006年1月2日", "2013年5月13日"},
{LocaleZhCN, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006年 Jan 2日", "2013年 5 13日"},
{LocaleZhCN, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006年 January 2日", "2013年 5 月 13日"},
{LocaleZhCN, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "5 月"},
{LocaleZhTW, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006-01-2", "2013-05-13"},
{LocaleZhTW, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006/1/2 Monday", "2013/5/13 星期一"},
{LocaleZhTW, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006年1月2日 Monday", "2013年5月13日 星期一"},
{LocaleZhTW, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006年1月2日", "2013年5月13日"},
{LocaleZhTW, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006年 Jan 2日", "2013年 5 13日"},
{LocaleZhTW, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006年 January 2日", "2013年 5 月 13日"},
{LocaleZhTW, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "5 月"},
{LocaleZhHK, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006-01-2", "2013-05-13"},
{LocaleZhHK, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006/1/2 Monday", "2013/5/13 星期一"},
{LocaleZhHK, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006年1月2日 Monday", "2013年5月13日 星期一"},
{LocaleZhHK, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006年1月2日", "2013年5月13日"},
{LocaleZhHK, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006年 Jan 2日", "2013年 5 13日"},
{LocaleZhHK, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006年 January 2日", "2013年 5 月 13日"},
{LocaleZhHK, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "5 月"},
{LocaleKoKR, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006/01/2", "2013/05/13"},
{LocaleKoKR, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006/1/2 Monday", "2013/5/13 월요일"},
{LocaleKoKR, time.Date(2013, 5, 13, 10, 30, 0, 0, time.UTC), "2006/1/2 Monday 3:04pm", "2013/5/13 월요일 10:30오전"},
{LocaleKoKR, time.Date(2013, 5, 13, 23, 30, 0, 0, time.UTC), "2006/1/2 Monday 3:04PM", "2013/5/13 월요일 11:30오후"},
{LocaleKoKR, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006 Jan 2 Monday", "2013 5월 13 월요일"},
{LocaleKoKR, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006 Jan 2", "2013 5월 13"},
{LocaleKoKR, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006 January 2", "2013 5월 13"},
{LocaleKoKR, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "5월"},
{LocaleJaJP, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006/01/2", "2013/05/13"},
{LocaleJaJP, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006/1/2 Monday", "2013/5/13 月曜日"},
{LocaleJaJP, time.Date(2013, 5, 13, 10, 30, 0, 0, time.UTC), "2006/1/2 Monday 3:04pm", "2013/5/13 月曜日 10:30午前"},
{LocaleJaJP, time.Date(2013, 5, 13, 23, 30, 0, 0, time.UTC), "2006/1/2 Monday 3:04PM", "2013/5/13 月曜日 11:30午後"},
{LocaleJaJP, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006 Jan 2 Monday", "2013 5月 13 月曜日"},
{LocaleJaJP, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006 Jan 2", "2013 5月 13"},
{LocaleJaJP, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006 January 2", "2013 5月 13"},
{LocaleJaJP, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "5月"},
{LocaleElGR, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "Τρι Σεπ 3 2013"},
{LocaleElGR, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "Τετάρτη Σεπ 4 2013"},
{LocaleElGR, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "Πέμπτη Οκτώβριος 03 2013"},
{LocaleElGR, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "Κυριακή. 3 Νοεμβρίου 2013"},
{LocaleElGR, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 Μαΐου. Δευτέρα"},
{LocaleElGR, time.Date(2015, 5, 23, 22, 7, 0, 0, time.UTC), "2 Jan 2006 3:04pm", "23 Μαϊ 2015 10:07μμ"},
{LocaleElGR, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "Μάιος"},
{LocaleElGR, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 Μαΐου"},
{LocaleIdID, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "Sel Sep 3 2013"},
{LocaleIdID, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "Rabu Sep 4 2013"},
{LocaleIdID, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "Kamis Oktober 03 2013"},
{LocaleIdID, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "Minggu. 3 November 2013"},
{LocaleIdID, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 Mei. Senin"},
{LocaleIdID, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 Mei 2013"},
{LocaleIdID, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "Mei"},
{LocaleIdID, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 Mei"},
{LocaleCsCZ, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "út zář 3 2013"},
{LocaleCsCZ, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "středa zář 4 2013"},
{LocaleCsCZ, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "čtvrtek říjen 03 2013"},
{LocaleCsCZ, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "neděle. 3 listopad 2013"},
{LocaleCsCZ, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 květen. pondělí"},
{LocaleCsCZ, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 kvě 2013"},
{LocaleCsCZ, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "květen"},
{LocaleCsCZ, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 květen"},
{LocaleSlSI, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "tor sep 3 2013"},
{LocaleSlSI, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "sreda sep 4 2013"},
{LocaleSlSI, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "četrtek oktober 03 2013"},
{LocaleSlSI, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "nedelja. 3 november 2013"},
{LocaleSlSI, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 maj. ponedeljek"},
{LocaleSlSI, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 maj 2013"},
{LocaleSlSI, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "maj"},
{LocaleSlSI, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 maj"},
{LocaleEtEE, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "T sept 3 2013"},
{LocaleEtEE, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "kolmapäev sept 4 2013"},
{LocaleEtEE, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "neljapäev oktoober 03 2013"},
{LocaleEtEE, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "pühapäev. 3 november 2013"},
{LocaleEtEE, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 mai. esmaspäev"},
{LocaleEtEE, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 mai 2013"},
{LocaleEtEE, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "mai"},
{LocaleEtEE, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 mai"},
{LocaleHrHR, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "uto ruj 3 2013"},
{LocaleHrHR, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "srijeda ruj 4 2013"},
{LocaleHrHR, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "četvrtak listopad 03 2013"},
{LocaleHrHR, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "nedjelja. 3 studeni 2013"},
{LocaleHrHR, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 svibanj. ponedjeljak"},
{LocaleHrHR, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 svi 2013"},
{LocaleHrHR, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "svibanj"},
{LocaleHrHR, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 svibanj"},
{LocaleLvLV, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "Otrd sept 3 2013"},
{LocaleLvLV, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "Trešdiena sept 4 2013"},
{LocaleLvLV, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "Ceturtdiena oktobris 03 2013"},
{LocaleLvLV, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "Svētdiena. 3 novembris 2013"},
{LocaleLvLV, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 maijs. Pirmdiena"},
{LocaleLvLV, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 maijs 2013"},
{LocaleLvLV, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "maijs"},
{LocaleLvLV, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 maijs"},
{LocaleSkSK, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "ut sep 3 2013"},
{LocaleSkSK, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "streda sep 4 2013"},
{LocaleSkSK, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "štvrtok október 03 2013"},
{LocaleSkSK, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "nedeľa. 3 november 2013"},
{LocaleSkSK, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 máj. pondelok"},
{LocaleSkSK, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 máj 2013"},
{LocaleSkSK, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "máj"},
{LocaleSkSK, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 máj"},
{LocaleThTH, time.Date(2022, 7, 8, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "ศ. ก.ค. 8 2022"},
{LocaleThTH, time.Date(2022, 7, 8, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "วันศุกร์ ก.ค. 8 2022"},
{LocaleThTH, time.Date(2022, 2, 1, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "วันอังคาร กุมภาพันธ์ 01 2022"},
{LocaleThTH, time.Date(2022, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January.", "2022. 13 พฤษภาคม."},
{LocaleThTH, time.Date(2022, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 พ.ค. 2022"},
{LocaleThTH, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "พฤษภาคม"},
{LocaleThTH, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 พฤษภาคม"},
{LocaleUzUZ, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "Se Sen 3 2013"},
{LocaleUzUZ, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "Chorshanba Sen 4 2013"},
{LocaleUzUZ, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "Payshanba Oktyabr 03 2013"},
{LocaleUzUZ, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "Yakshanba. 3 noyabr 2013"},
{LocaleUzUZ, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 may. Dushanba"},
{LocaleUzUZ, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 may 2013"},
{LocaleUzUZ, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "May"},
{LocaleUzUZ, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 may"},
{LocaleKkKZ, time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "Сс Қыр 3 2013"},
{LocaleKkKZ, time.Date(2013, 9, 4, 0, 0, 0, 0, time.UTC), "Monday Jan 2 2006", "Сәрсенбі Қыр 4 2013"},
{LocaleKkKZ, time.Date(2013, 10, 3, 0, 0, 0, 0, time.UTC), "Monday January 02 2006", "Бейсенбі Қазан 03 2013"},
{LocaleKkKZ, time.Date(2013, 11, 3, 0, 0, 0, 0, time.UTC), "Monday. 2 January 2006", "Жексенбі. 3 қараша 2013"},
{LocaleKkKZ, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2006. 2 January. Monday", "2013. 13 мамыр. Дүйсенбі"},
{LocaleKkKZ, time.Date(2013, 5, 13, 0, 0, 0, 0, time.UTC), "2 Jan 2006", "13 мам 2013"},
{LocaleKkKZ, time.Date(0, 5, 1, 0, 0, 0, 0, time.UTC), "January", "Мамыр"},
{LocaleKkKZ, time.Date(0, 5, 13, 0, 0, 0, 0, time.UTC), "2 January", "13 мамыр"},
}
func TestFormat(t *testing.T) {
for i, ts := range formatTests {
txt := Format(ts.date, ts.layout, ts.locale)
if txt != ts.expected {
t.Errorf("Test #%d (%s: %s) => Format failed.\n Got: %s\n Expected: %s\n", i, ts.locale, ts.layout, txt, ts.expected)
continue
}
reverseDate, err := ParseInLocation(ts.layout, txt, time.UTC, ts.locale)
if err != nil {
t.Errorf("Test #%d (%s: %s) => Reverse parse from '%s' error: %s", i, ts.locale, ts.layout, txt, err)
continue
}
if reverseDate != ts.date {
t.Errorf("Test #%d (%s: %s) => Reverse parse from '%s' failed.\n Got: %s\n Expected: %s\n",
i, ts.locale, ts.layout, txt, reverseDate.Format(time.RFC850), ts.date.Format(time.RFC850))
continue
}
}
}
func BenchmarkFormat(b *testing.B) {
for i := 0; i < b.N; i++ {
for _, ts := range formatTests {
txt := Format(ts.date, ts.layout, ts.locale)
if txt != ts.expected {
b.Errorf("failed")
continue
}
}
}
}
func TestBadLocale(t *testing.T) {
txt := Format(time.Date(2013, 9, 3, 0, 0, 0, 0, time.UTC), "Mon Jan 2 2006", "aa_AA")
if txt != "Tue Sep 3 2013" {
t.Error("Failed to test with bad locale. ", txt)
}
_, err := ParseInLocation("Mon January 2006", "Sun April 2013", time.UTC, "aa_AA")
if err.Error() != "unsupported locale: aa_AA" {
t.Error("Failed to test with unsupported locale.")
}
}
func TestGetShortDays(t *testing.T) {
locales := ListLocales()
for _, locale := range locales {
days := GetShortDays(locale)
if days == nil || len(days) != 7 {
t.Error("Not expected result. ", days)
}
// according to https://www.timeanddate.com/calendar/days/monday.html
// only Canada, USA and Japan use Sunday as first day of the week
switch locale {
case LocaleEnUS:
if days[0] != shortDayNamesEnUS["Sun"] {
t.Error("first day of week in US should be Sunday", days)
}
case LocaleJaJP:
if days[0] != shortDayNamesJaJP["Sun"] {
t.Error("first day of week in JP should be Sunday", days)
}
default:
if days[0] != knownDaysShort[locale]["Mon"] {
t.Error("first day of week should be Monday", days, locale)
}
}
}
}
func TestGetLongDays(t *testing.T) {
locales := ListLocales()
for _, locale := range locales {
days := GetLongDays(locale)
if days == nil || len(days) != 7 {
t.Error("Not expected result. ", days)
}
// according to https://www.timeanddate.com/calendar/days/monday.html
// only Canada, USA and Japan use Sunday as first day of the week
switch locale {
case LocaleEnUS:
if days[0] != longDayNamesEnUS["Sunday"] {
t.Error("first day of week in US should be Sunday", days)
}
case LocaleJaJP:
if days[0] != longDayNamesJaJP["Sunday"] {
t.Error("first day of week in JP should be Sunday", days)
}
default:
if days[0] != knownDaysLong[locale]["Monday"] {
t.Error("first day of week should be Monday", days, locale)
}
}
}
}
func ExampleFormat() {
t := time.Date(2013, 4, 25, 0, 0, 0, 0, time.UTC)
locales := ListLocales()
for _, loc := range locales {
fmt.Printf("Locale: %s\n", loc)
// Full date format
fmt.Printf(" Full: %s\n", Format(t, FullFormatsByLocale[loc], loc))
// Long date format
fmt.Printf(" Long: %s\n", Format(t, LongFormatsByLocale[loc], loc))
// Medium date format
fmt.Printf(" Medium: %s\n", Format(t, MediumFormatsByLocale[loc], loc))
// Short date format
fmt.Printf(" Short: %s\n", Format(t, ShortFormatsByLocale[loc], loc))
// DateTime format
fmt.Printf(" DateTime: %s\n", Format(t, DateTimeFormatsByLocale[loc], loc))
}
}
func ExampleParseInLocation() {
layout := "2 January 2006 15:04:05 MST"
fmt.Println(ParseInLocation(layout, "12 April 2013 00:00:00 MST", time.UTC, LocaleEnUS))
fmt.Println(ParseInLocation(layout, "12 апреля 2013 00:00:00 MST", time.UTC, LocaleRuRU))
fmt.Println(ParseInLocation(layout, "12 квітня 2013 00:00:00 MST", time.UTC, LocaleUkUA))
}
func ExampleParse() {
layout := "2 January 2006 15:04:05 MST"
fmt.Println(Parse(layout, "12 April 2013 00:00:00 MST", LocaleEnUS))
fmt.Println(Parse(layout, "12 апреля 2013 00:00:00 MST", LocaleRuRU))
fmt.Println(Parse(layout, "12 квітня 2013 00:00:00 MST", LocaleUkUA))
}