Revision 1017 trunk/libraries/libGDBMS/src/com/hardcode/gdbms/engine/values/DateValue.java
DateValue.java | ||
---|---|---|
3 | 3 |
import com.hardcode.gdbms.engine.instruction.IncompatibleTypesException; |
4 | 4 |
|
5 | 5 |
import java.sql.Date; |
6 |
import java.text.SimpleDateFormat; |
|
6 | 7 |
|
7 | 8 |
|
8 | 9 |
/** |
... | ... | |
91 | 92 |
* @see com.hardcode.gdbms.engine.values.Operations#greater(com.hardcode.gdbms.engine.values.Value) |
92 | 93 |
*/ |
93 | 94 |
public Value greater(Value value) throws IncompatibleTypesException { |
94 |
return value.greater(this);
|
|
95 |
return value.less(this);
|
|
95 | 96 |
} |
96 | 97 |
|
97 | 98 |
/** |
98 | 99 |
* @see com.hardcode.gdbms.engine.values.Operations#greaterEqual(com.hardcode.gdbms.engine.values.Value) |
99 | 100 |
*/ |
100 | 101 |
public Value greaterEqual(Value value) throws IncompatibleTypesException { |
101 |
return value.greaterEqual(this);
|
|
102 |
return value.lessEqual(this);
|
|
102 | 103 |
} |
103 | 104 |
|
104 | 105 |
/** |
105 | 106 |
* @see com.hardcode.gdbms.engine.values.Operations#less(com.hardcode.gdbms.engine.values.Value) |
106 | 107 |
*/ |
107 | 108 |
public Value less(Value value) throws IncompatibleTypesException { |
108 |
return value.less(this);
|
|
109 |
return value.greater(this);
|
|
109 | 110 |
} |
110 | 111 |
|
111 | 112 |
/** |
112 | 113 |
* @see com.hardcode.gdbms.engine.values.Operations#lessEqual(com.hardcode.gdbms.engine.values.Value) |
113 | 114 |
*/ |
114 | 115 |
public Value lessEqual(Value value) throws IncompatibleTypesException { |
115 |
return value.lessEqual(this);
|
|
116 |
return value.greaterEqual(this);
|
|
116 | 117 |
} |
117 | 118 |
|
118 | 119 |
/** |
... | ... | |
122 | 123 |
return value.notEquals(this); |
123 | 124 |
} |
124 | 125 |
public String toString() { |
125 |
return value.toString(); |
|
126 |
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); |
|
127 |
return sdf.format(value); |
|
126 | 128 |
} |
127 | 129 |
} |
Also available in: Unified diff