Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
proto3
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
Container registry
Model registry
Operate
Environments
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
protokollsystem
proto3
Commits
593dee5c
Commit
593dee5c
authored
7 years ago
by
Robin Sonnabend
Browse files
Options
Downloads
Patches
Plain Diff
Make date/time filters more tolerant to None
parent
f7ca1a54
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
shared.py
+10
-0
10 additions, 0 deletions
shared.py
with
10 additions
and
0 deletions
shared.py
+
10
−
0
View file @
593dee5c
...
@@ -75,22 +75,32 @@ def date_filter(date):
...
@@ -75,22 +75,32 @@ def date_filter(date):
def
datetime_filter
(
date
):
def
datetime_filter
(
date
):
if
date
is
None
:
return
""
return
date
.
strftime
(
"
%d. %B %Y, %H:%M
"
)
return
date
.
strftime
(
"
%d. %B %Y, %H:%M
"
)
def
date_filter_long
(
date
):
def
date_filter_long
(
date
):
if
date
is
None
:
return
""
return
date
.
strftime
(
"
%A, %d.%m.%Y, Kalenderwoche %W
"
)
return
date
.
strftime
(
"
%A, %d.%m.%Y, Kalenderwoche %W
"
)
def
date_filter_short
(
date
):
def
date_filter_short
(
date
):
if
date
is
None
:
return
""
return
date
.
strftime
(
"
%d.%m.%Y
"
)
return
date
.
strftime
(
"
%d.%m.%Y
"
)
def
time_filter
(
time
):
def
time_filter
(
time
):
if
time
is
None
:
return
""
return
time
.
strftime
(
"
%H:%M Uhr
"
)
return
time
.
strftime
(
"
%H:%M Uhr
"
)
def
time_filter_short
(
time
):
def
time_filter_short
(
time
):
if
time
is
None
:
return
""
return
time
.
strftime
(
"
%H:%M
"
)
return
time
.
strftime
(
"
%H:%M
"
)
...
...
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