/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
*/ package cal;
import java.util.Calendar; import java.util.Date;
publicclass JspCalendar { final Calendar calendar;
public JspCalendar() {
calendar = Calendar.getInstance();
Date trialTime = new Date();
calendar.setTime(trialTime);
}
public String getMonth() { int m = getMonthInt();
String[] months = new String [] { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; if (m > 12) { return"Unknown to Man";
}
return months[m - 1];
}
public String getDay() { int x = getDayOfWeek();
String[] days = new String[] {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.