Package net.sourceforge.ganttproject.time.gregorian

Examples of net.sourceforge.ganttproject.time.gregorian.GregorianCalendar


        return new GanttCalendar(tmp.get(Calendar.YEAR), tmp
                .get(Calendar.MONTH), tmp.get(Calendar.DATE));
    }

    public String getMonth(int m) {
        GregorianCalendar month = new GregorianCalendar(2000, m, 1);
        SimpleDateFormat dateFormat = new SimpleDateFormat("MMMM",
                this.currentLocale);
        StringBuffer result = new StringBuffer();
        result = dateFormat.format(month.getTime(), result, new FieldPosition(
                DateFormat.MONTH_FIELD));
        return result.toString();
    }
View Full Code Here


                DateFormat.MONTH_FIELD));
        return result.toString();
    }

    public String getDay(int d) {
        GregorianCalendar day = new GregorianCalendar(2000, 1, 1);
        while (day.get(Calendar.DAY_OF_WEEK) != Calendar.SUNDAY) {
            day.add(Calendar.DATE, 1);
        }
        day.add(Calendar.DATE, d);

        SimpleDateFormat dateFormat = new SimpleDateFormat("EEE",
                this.currentLocale);
        StringBuffer result = new StringBuffer();
        result = dateFormat.format(day.getTime(), result, new FieldPosition(
                DateFormat.DAY_OF_WEEK_FIELD));
        return result.toString();
    }
View Full Code Here

        ddd = new GanttDialogDateDay(date, language);
        jtDate = new JFormattedTextField(new SimpleDateFormat("MMM yyyy"));
        jtDate.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                GregorianCalendar tmp = new GregorianCalendar();
                tmp.setTime((Date) jtDate.getValue());
                changeDate(tmp);
            }
        });
        jtDate.setValue(ddd.date.getTime());
        jtDate.setEditable(false);
View Full Code Here

TOP

Related Classes of net.sourceforge.ganttproject.time.gregorian.GregorianCalendar

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.