From c97b16b8bcd03046fc58a66444fc53daeeb86c51 Mon Sep 17 00:00:00 2001 From: Eric Scharff Date: Mon, 29 Oct 2007 15:23:13 -0600 Subject: [PATCH] implement a few classpath methods required by SWT for Mac OS X --- classpath/java/text/DateFormatSymbols.java | 13 +++++++++++++ classpath/java/util/Calendar.java | 6 ++++++ 2 files changed, 19 insertions(+) diff --git a/classpath/java/text/DateFormatSymbols.java b/classpath/java/text/DateFormatSymbols.java index 1661712a78..b654ed6e27 100644 --- a/classpath/java/text/DateFormatSymbols.java +++ b/classpath/java/text/DateFormatSymbols.java @@ -2,6 +2,11 @@ package java.text; public class DateFormatSymbols { private String[] ampm = new String[] { "AM", "PM" }; + private String[] shortWeekdays = new String[] { "Sun", "Mon", "Tue", + "Wed", "Thu", "Fri", "Sat" }; + private String[] shortMonths = new String[] { "Jan", "Feb", "Mar", "Apr", + "May", "Jun", "Jul", "Aug", + "Sep", "Oct", "Nov", "Dec" }; public String[] getAmPmStrings() { return ampm; @@ -10,4 +15,12 @@ public class DateFormatSymbols { public void setAmPmStrings(String[] v) { ampm = v; } + + public String[] getShortWeekdays() { + return shortWeekdays; + } + + public String[] getShortMonths() { + return shortMonths; + } } diff --git a/classpath/java/util/Calendar.java b/classpath/java/util/Calendar.java index dbf16b3cc4..3ba0e2da60 100644 --- a/classpath/java/util/Calendar.java +++ b/classpath/java/util/Calendar.java @@ -4,6 +4,7 @@ public abstract class Calendar { public static final int AM = 0; public static final int AM_PM = 9; public static final int DAY_OF_MONTH = 5; + public static final int DAY_OF_WEEK = 7; public static final int HOUR = 10; public static final int HOUR_OF_DAY = 11; public static final int MINUTE = 12; @@ -39,6 +40,7 @@ public abstract class Calendar { } public abstract void roll(int field, boolean up); + public abstract void add(int field, int amount); public void roll(int field, int amount) { boolean up = amount >= 0; @@ -122,6 +124,10 @@ public abstract class Calendar { // todo } + public void add(int fild, int amount) { + // todo + } + public int getMinimum(int field) { // todo return 0;