Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Travel-Status-DE-IRIS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
derf
Travel-Status-DE-IRIS
Commits
43fbf64b
Commit
43fbf64b
authored
7 years ago
by
Birte Kristina Friesel
Browse files
Options
Downloads
Patches
Plain Diff
db-iris: Support "--date tomorrow"
parent
844d1763
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/db-iris
+15
-9
15 additions, 9 deletions
bin/db-iris
with
15 additions
and
9 deletions
bin/db-iris
+
15
−
9
View file @
43fbf64b
...
...
@@ -71,21 +71,26 @@ if ($track_via) {
if
(
$date
)
{
my
(
$day
,
$month
,
$year
)
=
split
(
qr{ [.] }
x
,
$date
);
if
(
not
(
defined
$day
and
defined
$month
)
if
(
$date
eq
'
tomorrow
'
)
{
$datetime
->
add
(
days
=>
1
);
}
elsif
(
not
(
defined
$day
and
defined
$month
)
or
(
$day
<
1
)
or
(
$day
>
31
)
or
(
$month
<
1
)
or
(
$month
>
12
)
)
{
say
STDERR
"
-d/--date: Please specify a valid date
";
say
STDERR
"
-d/--date: Please specify a valid date (dd.mm. / dd.mm.YYYY / tomorrow)
";
exit
(
3
);
}
$datetime
->
set
(
day
=>
$day
,
month
=>
$month
,
year
=>
$year
||
$datetime
->
year
,
);
else
{
$datetime
->
set
(
day
=>
$day
,
month
=>
$month
,
year
=>
$year
||
$datetime
->
year
,
);
}
}
if
(
$time
)
{
my
(
$hour
,
$minute
,
$second
)
=
split
(
qr{ : }
x
,
$time
);
...
...
@@ -567,7 +572,8 @@ Valid classes are:
=item B<-d>, B<--date> I<date>
Request results for I<date> in dd.mm. or dd.mm.YYYY format. Note that only
Request results for I<date>, which is either a date string in in I<dd>.I<mm>.
or I<dd>.I<mm>.I<YYYY> format, or C<< tomorrow >>. Note that typically only
slight (a few hours max) deviations from the current time are supported by the
IRIS backend, larger ones will not return data.
...
...
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