Skip to content

Commit fc2d031

Browse files
Add files via upload
''
1 parent cfce1f0 commit fc2d031

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function convertedDate = convertDate(date)
2-
date.Format = 'yyyy-MM-dd HH:mm:ss';
3-
convertedDate = char(date);
1+
function convertedDate = convertDate(date)
2+
date.Format = 'yyyy-MM-dd HH:mm:ss';
3+
convertedDate = char(date);
44
end
Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
function [converted,type] = convertDuration(duration)
2-
switch (duration.Format)
3-
case 's'
4-
converted = seconds(duration);
5-
type = 'sec';
6-
case 'm'
7-
converted = minutes(duration);
8-
type = 'min';
9-
case 'h'
10-
converted = hours(duration);
11-
type = 'hr';
12-
case 'd'
13-
converted = days(duration);
14-
type = 'days';
15-
case 'y'
16-
converted = years(duration);
17-
type = 'yrs';
18-
otherwise
19-
%no convertion is applied
20-
converted = duration;
21-
type = '';
22-
23-
end
1+
function [converted,type] = convertDuration(duration)
2+
switch (duration.Format)
3+
case 's'
4+
converted = seconds(duration);
5+
type = 'sec';
6+
case 'm'
7+
converted = minutes(duration);
8+
type = 'min';
9+
case 'h'
10+
converted = hours(duration);
11+
type = 'hr';
12+
case 'd'
13+
converted = days(duration);
14+
type = 'days';
15+
case 'y'
16+
converted = years(duration);
17+
type = 'yrs';
18+
otherwise
19+
%no convertion is applied
20+
converted = duration;
21+
type = '';
22+
23+
end
2424
end

0 commit comments

Comments
 (0)