-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathWeek.java
More file actions
29 lines (23 loc) · 675 Bytes
/
Week.java
File metadata and controls
29 lines (23 loc) · 675 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package dynamicTT;
import java.text.DateFormatSymbols;
import java.util.ArrayList;
public class Week {
private String[] weekDaysName;
private ArrayList <Day> weekDays=new ArrayList<Day>();
public ArrayList<Day> getWeekDays() {
return weekDays;
}
public void setWeekDays(ArrayList<Day> weekDays) {
this.weekDays = weekDays;
}
public Week(){
this.weekDaysName = new DateFormatSymbols().getWeekdays();
for (int i = 1; i < weekDaysName.length; i++) {
//System.out.println("weekday = " + weekDaysName[i]);
if(!(weekDaysName[i].equalsIgnoreCase("Sunday"))){
Day newday=new Day(weekDaysName[i]);
weekDays.add(newday);
}
}
}
}