|
1 | | -/* |
| 1 | +/* |
2 | 2 | * MediathekView |
3 | 3 | * Copyright (C) 2008 W. Xaver |
4 | 4 | * W.Xaver[at]googlemail.com |
5 | 5 | * http://zdfmediathk.sourceforge.net/ |
6 | | - * |
| 6 | + * |
7 | 7 | * This program is free software: you can redistribute it and/or modify |
8 | 8 | * it under the terms of the GNU General Public License as published by |
9 | 9 | * the Free Software Foundation, either version 3 of the License, or |
|
19 | 19 | */ |
20 | 20 | package de.mediathekview.mlib.tool; |
21 | 21 |
|
22 | | -import de.mediathekview.mlib.tool.Datum; |
23 | | - |
24 | 22 | import java.text.SimpleDateFormat; |
25 | | -import java.util.Date; |
26 | 23 | import java.util.TimeZone; |
27 | 24 |
|
28 | 25 | @SuppressWarnings("serial") |
29 | 26 | public class DatumFilm extends Datum { |
30 | | - // die Filme werden immer in der Zeitzone "Europe/Berlin" gesucht |
| 27 | + // die Filme werden immer in der Zeitzone "Europe/Berlin" gesucht |
31 | 28 |
|
32 | | - private final static SDF dateFormatter1 = new SDF("dd.MM.yyyy"); |
33 | | - private final static SDF dateFormatter2 = new SDF("yyyy.MM.dd"); |
| 29 | + private static final SDF dateFormatter1 = new SDF("dd.MM.yyyy"); |
34 | 30 |
|
35 | | - public DatumFilm() { |
36 | | - super(); |
37 | | - } |
| 31 | + public DatumFilm(long l) { |
| 32 | + super(l); |
| 33 | + } |
38 | 34 |
|
39 | | - public DatumFilm(long l) { |
40 | | - super(l); |
| 35 | + @Override |
| 36 | + public String toString() { |
| 37 | + if (this.getTime() == 0) { |
| 38 | + return ""; |
| 39 | + } else { |
| 40 | + return dateFormatter1.format(this); |
41 | 41 | } |
| 42 | + } |
42 | 43 |
|
43 | | - @Override |
44 | | - public String toString() { |
45 | | - if (this.getTime() == 0) { |
46 | | - return ""; |
47 | | - } else { |
48 | | - return dateFormatter1.format(this); |
49 | | - } |
50 | | - } |
| 44 | + private static class SDF extends SimpleDateFormat { |
| 45 | + private static final TimeZone tz = TimeZone.getTimeZone("Europe/Berlin"); |
51 | 46 |
|
52 | | - @Override |
53 | | - public String toStringR() { |
54 | | - if (this.getTime() == 0) { |
55 | | - return dateFormatter2.format(new Date()); |
56 | | - } else { |
57 | | - return dateFormatter2.format(this); |
58 | | - } |
| 47 | + public SDF() { |
| 48 | + super(); |
| 49 | + this.setTimeZone(tz); |
59 | 50 | } |
60 | 51 |
|
61 | | - private static class SDF extends SimpleDateFormat { |
62 | | - private final static TimeZone tz = TimeZone.getTimeZone("Europe/Berlin"); |
63 | | - |
64 | | - public SDF() { |
65 | | - super(); |
66 | | - this.setTimeZone(tz); |
67 | | - } |
68 | | - |
69 | | - public SDF(String str) { |
70 | | - super(str); |
71 | | - this.setTimeZone(tz); |
72 | | - } |
| 52 | + public SDF(String str) { |
| 53 | + super(str); |
| 54 | + this.setTimeZone(tz); |
73 | 55 | } |
| 56 | + } |
74 | 57 | } |
0 commit comments