PageRenderTime 47ms CodeModel.GetById 41ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/src/mpv5/utils/date/vDate.java

http://mp-rechnungs-und-kundenverwaltung.googlecode.com/
Java | 88 lines | 37 code | 13 blank | 38 comment | 6 complexity | c26bcb654805784ef9621d92da9bc9dc MD5 | raw file
 1/*
 2 * 
 3This file is part of YaBS.
 4
 5YaBS is free software: you can redistribute it and/or modify
 6it under the terms of the GNU General Public License as published by
 7the Free Software Foundation, either version 3 of the License, or
 8(at your option) any later version.
 9
10YaBS is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with YaBS.  If not, see <http://www.gnu.org/licenses/>.
17
18 * 
19 */
20package mpv5.utils.date;
21
22
23import java.util.Date;
24
25/**
26 *
27 * 
28 */
29public class vDate {
30    private boolean isVerified = false;
31    private String defDate = null;
32    private String sqlDate = null;
33    private Date date = null;
34    private String ovalue = "";
35
36    public vDate(String date) {
37
38        ovalue = date;
39
40        try {
41            this.date = DateConverter.getDate(date);
42            defDate = DateConverter.getDefDateString(this.date);
43            sqlDate = DateConverter.getSQLDateString(this.date);
44
45            if (this.date != null && defDate != null && sqlDate != null) {
46                this.isVerified = true;
47            }
48        } catch (Exception e) {
49            this.isVerified = false;
50        }
51
52    }
53
54    /**
55     * @return the isVerified
56     */
57    public boolean isIsVerified() {
58        return isVerified;
59    }
60
61    /**
62     * @return the defDate
63     */
64    public String getDefDate() {
65        return defDate;
66    }
67
68    /**
69     * @return the sqlDate
70     */
71    public String getSqlDate() {
72        return sqlDate;
73    }
74
75    /**
76     * @return the date
77     */
78    public Date getDate() {
79        return date;
80    }
81
82    /**
83     * @return the ovalue
84     */
85    public String getOvalue() {
86        return ovalue;
87    }
88}