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