Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TAM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIP
Labrador
TAM
Commits
3590a001
Commit
3590a001
authored
Mar 6, 2024
by
Timur Oberhuber
Browse files
Options
Downloads
Patches
Plain Diff
MR Review Changes
parent
2c907fb2
Branches
Branches containing commit
No related tags found
1 merge request
!313
WAITING FOR OTTO - feat: :sparkles: Add Filtering by Quarters Functionality
Pipeline
#1030066
failed
Mar 6, 2024
Stage: build
Stage: prepare
Stage: test
Stage: publish
Stage: review
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/nl/tudelft/tam/enums/AcademicPeriod.java
+16
-25
16 additions, 25 deletions
src/main/java/nl/tudelft/tam/enums/AcademicPeriod.java
test.csv
+0
-4
0 additions, 4 deletions
test.csv
with
16 additions
and
29 deletions
src/main/java/nl/tudelft/tam/enums/AcademicPeriod.java
+
16
−
25
View file @
3590a001
...
...
@@ -72,27 +72,20 @@ public enum AcademicPeriod {
public
static
AcademicPeriod
getAcademicPeriodFromString
(
String
toCheck
)
{
String
cleanedString
=
toCheck
.
toUpperCase
().
replace
(
" "
,
""
);
if
(
cleanedString
.
contains
(
"Q1/Q2"
)
||
cleanedString
.
contains
(
"Q1/2"
)
||
cleanedString
.
contains
(
"Q1&Q2"
)
||
cleanedString
.
contains
(
"Q1ANDQ2"
)
||
cleanedString
.
contains
(
"Q1ENQ2"
)
||
cleanedString
.
contains
(
"Q1+Q2"
))
{
if
(
cleanedString
.
contains
(
"1"
)
&&
cleanedString
.
contains
(
"2"
))
{
return
S1
;
}
else
if
(
cleanedString
.
contains
(
"Q3/Q4"
)
||
cleanedString
.
contains
(
"Q3/4"
)
||
cleanedString
.
contains
(
"Q3&Q4"
)
||
cleanedString
.
contains
(
"Q3ANDQ4"
)
||
cleanedString
.
contains
(
"Q3ENQ4"
)
||
cleanedString
.
contains
(
"Q3+Q4"
))
{
}
else
if
(
cleanedString
.
contains
(
"3"
)
&&
cleanedString
.
contains
(
"4"
))
{
return
S2
;
}
else
if
(
cleanedString
.
contains
(
"
Q1"
)
||
cleanedString
.
contains
(
"Quarter
1"
))
{
}
else
if
(
cleanedString
.
contains
(
"1"
))
{
return
Q1
;
}
else
if
(
cleanedString
.
contains
(
"
Q2"
)
||
cleanedString
.
contains
(
"Quarter
2"
))
{
}
else
if
(
cleanedString
.
contains
(
"2"
))
{
return
Q2
;
}
else
if
(
cleanedString
.
contains
(
"
Q3"
)
||
cleanedString
.
contains
(
"Quarter
3"
))
{
}
else
if
(
cleanedString
.
contains
(
"3"
))
{
return
Q3
;
}
else
if
(
cleanedString
.
contains
(
"
Q4"
)
||
cleanedString
.
contains
(
"Quarter
4"
))
{
}
else
if
(
cleanedString
.
contains
(
"4"
))
{
return
Q4
;
}
else
if
(
cleanedString
.
contains
(
"Q5"
)
||
cleanedString
.
contains
(
"Quarter5"
)
||
cleanedString
.
contains
(
"Summer"
)
||
cleanedString
.
contains
(
"Zomer"
))
{
}
else
if
(
cleanedString
.
contains
(
"5"
)
||
cleanedString
.
contains
(
"Summer"
)
||
cleanedString
.
contains
(
"Zomer"
))
{
return
SUMMER
;
}
...
...
@@ -120,17 +113,15 @@ public enum AcademicPeriod {
return
S2
;
}
if
(
midpointMonthDay
.
isAfter
(
Q1
.
start
)
&&
midpointMonthDay
.
isBefore
(
Q1
.
end
))
{
return
Q1
;
}
else
if
(
midpointMonthDay
.
isAfter
(
Q2
.
start
)
&&
midpointMonthDay
.
isBefore
(
Q2
.
end
))
{
return
Q2
;
}
else
if
(
midpointMonthDay
.
isAfter
(
Q3
.
start
)
&&
midpointMonthDay
.
isBefore
(
Q3
.
end
))
{
return
Q3
;
}
else
if
(
midpointMonthDay
.
isAfter
(
Q4
.
start
)
&&
midpointMonthDay
.
isBefore
(
Q4
.
end
))
{
return
Q4
;
}
else
{
return
SUMMER
;
AcademicPeriod
[]
quarters
=
{
Q1
,
Q2
,
Q3
,
Q4
};
for
(
AcademicPeriod
quarter
:
quarters
)
{
if
(
midpointMonthDay
.
isAfter
(
quarter
.
start
)
&&
midpointMonthDay
.
isBefore
(
quarter
.
end
))
{
return
quarter
;
}
}
return
SUMMER
;
}
/**
...
...
This diff is collapsed.
Click to expand it.
test.csv
deleted
100644 → 0
+
0
−
4
View file @
2c907fb2
"name","age"
"John","13"
"Jane","65"
"Jack, with comma","3"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment