Package Framework

Examples of Framework.DateFormat


    /**
     * @param date
     * @return
     */
    public String toStringDate(DateTimeData date) {
        DateFormat gmtfmt = new DateFormat();
        gmtfmt.setTemplate("ddd, dd mmm yyyy hh:mm:ss GMT");
        return gmtfmt.formatDate(date).toString();
    }
View Full Code Here


    /**
     * @param date
     * @return
     */
    public DateTimeData fromStringDate(String date) {
        DateFormat gmtfmt = new DateFormat();
        gmtfmt.setTemplate("ddd, dd mmm yyyy hh:mm:ss GMT");
        return gmtfmt.decodeDate(date);
    }
View Full Code Here

    /**
     * @param date
     * @return
     */
    public String toStringDate(DateTimeData date) {
        DateFormat gmtfmt = new DateFormat();
        gmtfmt.setTemplate("ddd, dd mmm yyyy hh:mm:ss GMT");
        return gmtfmt.formatDate(date).toString();
    }
View Full Code Here

    /**
     * @param date
     * @return
     */
    public DateTimeData fromStringDate(String date) {
        DateFormat gmtfmt = new DateFormat();
        gmtfmt.setTemplate("ddd, dd mmm yyyy hh:mm:ss GMT");
        return gmtfmt.decodeDate(date);
    }
View Full Code Here

     * @param pYear Type: int
     * @return int
     */
    public int getDayOfWeek(int pMonth, int pYear) {
        DateTimeData lDate = new DateTimeData();
        DateFormat lFormat = new DateFormat(new TextData("m/d/yyyy"), DateFormat.qq_Resolver.cTEMPLATE);
        TextData tt = new TextData();
        tt.concat(pMonth).concat("/1/").concat(pYear);
        lDate.decodeValue(tt, lFormat);

        return lDate.dayOfWeek();
View Full Code Here

     * @param templateText Type: TextData
     */
    public void setValueTemplate(DataValue type, DataValue value, TextData templateText) {
        if (templateText != null) {
            if (type instanceof DateTimeData) {
                type.decodeValue(value.getTextValue(), new DateFormat(templateText));
            }
            else if (type instanceof NumericData) {
                type.decodeValue(value.getTextValue(), new NumericFormat(templateText));
            }
            else if (type instanceof TextData) {
View Full Code Here

    private Class<?> mappedType;
    private static final Pattern placeholderPattern = Pattern.compile("<(.)>");
    public DateTemplate(DataField component, TextData value) {
        super(component);
        this.template = value;
        this.formatter = new DateFormat();
    }
View Full Code Here

                    // doesn't call for time).
                    //
                    JComponent fld = this.getFieldForAttr(i);
                    if (fld != null && fld instanceof DataField && DateTemplate.get(((DataField)fld)) != null) {
                        ((DateTimeNullable)attr).setCurrent();
                        DateFormat fmt = new DateFormat(DateTemplate.get(((DataField)fld)));
                        TextData dateTxt = fmt.formatDate((DateTimeNullable)attr);

                        ((DateTimeNullable)attr).decodeValue(dateTxt, fmt);
                    }
                    else {
                        ((DateTimeNullable)attr).setCurrent();
View Full Code Here

     * @param templateText Type: TextData
     */
    public void setValueTemplate(DataValue type, DataValue value, TextData templateText) {
        if (templateText != null) {
            if (type instanceof DateTimeData) {
                type.decodeValue(value.getTextValue(), new DateFormat(templateText));
            }
            else if (type instanceof NumericData) {
                type.decodeValue(value.getTextValue(), new NumericFormat(templateText));
            }
            else if (type instanceof TextData) {
View Full Code Here

    private Class<?> mappedType;
    private static final Pattern placeholderPattern = Pattern.compile("<(.)>");
    public DateTemplate(DataField component, TextData value) {
        super(component);
        this.template = value;
        this.formatter = new DateFormat();
    }
View Full Code Here

TOP

Related Classes of Framework.DateFormat

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.