Revision 2078 org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/dataTypes/impl/coercion/AbstractCoerceToDate.java

View differences:

AbstractCoerceToDate.java
71 71
        if( valueStr.length()==0 ) {
72 72
            return null;
73 73
        }
74

  
74
        if( valueStr.toLowerCase().equals("now") ) {
75
            return this.now();
76
        }
75 77
        for (DateFormat formatter : formatters) {
76 78
            try {
77 79
                Date d = formatter.parse(valueStr);
......
113 115
     */
114 116
    protected abstract DateFormat[] getFormatters(Locale locale);
115 117

  
118
    protected abstract Date now();
119
    
116 120
    /**
117 121
     * Returns the name of the Date type being coerced. Ex: Date, DateTime,
118 122
     * Time. Only used for description when an error is produced when coercing

Also available in: Unified diff