Uh oh!
There was an error while loading. Please reload this page.
forked from gihanjayatilaka/Motify
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReadingFunctions.java
More file actions
Latest commit
35 lines (28 loc) · 995 Bytes
/
Copy pathReadingFunctions.java
File metadata and controls
35 lines (28 loc) · 995 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
30
31
32
33
34
35
publicclassReadingFunctions {
publicstaticintgetUID(Stringline){
returnInteger.parseInt(line.substring(line.indexOf(':')+1, line.indexOf('@')));
}
publicstaticStringgetSummary(Stringline){
returnline.substring(line.indexOf(':')+1);
}
publicstaticStringgetDescription(Stringline){
returngetSummary(line);
}
publicstaticint[] getModifiedTime(Stringline){
intn=line.indexOf(':')+1;
intyear=Integer.parseInt(line.substring(n, n+4));
intmonth=Integer.parseInt(line.substring(n+4, n+6));
intday=Integer.parseInt(line.substring(n+6, n+8));
inthour=Integer.parseInt(line.substring(n+9,n+11));
intminiute=Integer.parseInt(line.substring(n+11, n+13));
intsecond=Integer.parseInt(line.substring(n+13, n+15));
int[] time={year,month,day,hour,miniute,second};
returntime;
}
publicstaticint[] getEndTime(Stringline){
returngetModifiedTime(line);
}
publicstaticStringgetSubject(Stringline){
returngetSummary(line);
}
}