001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/sam/trunk/component/src/java/org/sakaiproject/tool/assessment/util/DateHandlerWithNull.java $
003: * $Id: DateHandlerWithNull.java 9273 2006-05-10 22:34:28Z daisyf@stanford.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 2005, 2006 The Sakai Foundation.
007: *
008: * Licensed under the Educational Community License, Version 1.0 (the"License");
009: * you may not use this file except in compliance with the License.
010: * You may obtain a copy of the License at
011: *
012: * http://www.opensource.org/licenses/ecl1.php
013: *
014: * Unless required by applicable law or agreed to in writing, software
015: * distributed under the License is distributed on an "AS IS" BASIS,
016: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: * See the License for the specific language governing permissions and
018: * limitations under the License.
019: *
020: **********************************************************************************/package org.sakaiproject.tool.assessment.util;
021:
022: import java.util.Arrays;
023: import java.util.Collection;
024: import java.util.List;
025:
026: /**
027: * <p>
028: * Title: sakaiproject.org
029: * </p>
030: *
031: * <p>
032: * Description: AAM - Date Class handling the Date funcionality
033: * </p>
034: *
035: * <p>
036: * Copyright: Copyright (c) 2003
037: * </p>
038: *
039: * <p>
040: * Company: Stanford University
041: * </p>
042: *
043: * @author Durairaju Madhu
044: * @author Rachel Gollub
045: * @version 1.0
046: */
047: public class DateHandlerWithNull {
048: private String[] dayArray = { "--", "1", "2", "3", "4", "5", "6",
049: "7", "8", "9", "10", "11", "12", "13", "14", "15", "16",
050: "17", "18", "19", "20", "21", "22", "23", "24", "25", "26",
051: "27", "28", "29", "30", "31" };
052: private String[] yearArray = { "--", "2003", "2004" };
053: private String[] monthArray = { "--", "1", "2", "3", "4", "5", "6",
054: "7", "8", "9", " 10", "11", "12" };
055: private String[] hourArray = { "01", "02", "03", "04", "05", "06",
056: "07", "08", "09", "10", "11", "12" };
057: private String[] minArray = { "00", "05", "10", "15", "20", "25",
058: "30", "35", "40", "45", "50", "55" };
059: private String[] ampmArray = { "AM", "PM" };
060: private List day = Arrays.asList(dayArray);
061: private List month = Arrays.asList(monthArray);
062: private List year = Arrays.asList(yearArray);
063: private List hour = Arrays.asList(hourArray);
064: private List min = Arrays.asList(minArray);
065: private List ampm = Arrays.asList(ampmArray);
066: private LabelValue[] wmonthArray = {
067: new LabelValue("January", "1"),
068: new LabelValue("February", "2"),
069: new LabelValue("March", "3"), new LabelValue("April", "4"),
070: new LabelValue("May", "5"), new LabelValue("June", "6"),
071: new LabelValue("July", "7"), new LabelValue("August", "8"),
072: new LabelValue("September", "9"),
073: new LabelValue("October", "10"),
074: new LabelValue("November", "11"),
075: new LabelValue("December", "12") };
076: private List wmonth = Arrays.asList(wmonthArray);
077:
078: /**
079: * DOCUMENTATION PENDING
080: *
081: * @return DOCUMENTATION PENDING
082: */
083: public Collection getDay() {
084: return (Collection) day;
085: }
086:
087: /**
088: * DOCUMENTATION PENDING
089: *
090: * @return DOCUMENTATION PENDING
091: */
092: public Collection getMonth() {
093: return (Collection) month;
094: }
095:
096: /**
097: * DOCUMENTATION PENDING
098: *
099: * @return DOCUMENTATION PENDING
100: */
101: public Collection getYear() {
102: return (Collection) year;
103: }
104:
105: /**
106: * DOCUMENTATION PENDING
107: *
108: * @return DOCUMENTATION PENDING
109: */
110: public Collection getHour() {
111: return (Collection) hour;
112: }
113:
114: /**
115: * DOCUMENTATION PENDING
116: *
117: * @return DOCUMENTATION PENDING
118: */
119: public Collection getMin() {
120: return (Collection) min;
121: }
122:
123: /**
124: * DOCUMENTATION PENDING
125: *
126: * @return DOCUMENTATION PENDING
127: */
128: public Collection getAmPm() {
129: return (Collection) ampm;
130: }
131:
132: /**
133: * DOCUMENTATION PENDING
134: *
135: * @return DOCUMENTATION PENDING
136: */
137: public Collection getWmonth() {
138: return (Collection) wmonth;
139: }
140: }
|