Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Robert Sebille
AaaaHorodatage
Commits
77ca65c9
Commit
77ca65c9
authored
Jun 16, 2018
by
Robert Sebille
Browse files
la méthode diffDays renvoie désormais ses résultats aussi en secondes
parent
786250ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
77ca65c9
...
...
@@ -139,6 +139,7 @@ _See « - operator » too_
return ts2 - self.ts1 in days, hours, minutes, seconds.
Offset UTC timestamp 1 must match offset UTC timestamp 2 and epoch timestamp 1 must match epoch timestamp 2.
Return typ =
- "seconds": return the number of seconds.
- "string": return a string (+/-DDTHH:MM:SS). Default.
- "list": return a list (fixed order).
fixed order: sens_difference, day, hour, minutes, seconds.
...
...
aaaa/ahordattools.py
View file @
77ca65c9
...
...
@@ -238,6 +238,7 @@ class AaaaHorodatageTools(AaaaHorodatage):
and epoch timestamp 1 must match epoch timestamp 2.
Return typ =
- "seconds": return the number of seconds.
- "string": return a string (+/-DDTHH:MM:SS). Default.
- "list": return a list (fixed order).
fixed order: sens_difference, day, hour, minutes, seconds.
...
...
@@ -291,6 +292,12 @@ class AaaaHorodatageTools(AaaaHorodatage):
heures
=
int
((
dts
/
(
60
*
60
))
%
24
)
jours
=
int
(
dts
/
(
60
*
60
*
24
))
if
typ
==
"seconds"
:
if
sens_diff
==
"-"
:
retour
=
-
dts
else
:
retour
=
dts
if
typ
==
"string"
:
retour
=
(
sens_diff
+
str
(
jours
)
+
"T"
+
str
(
heures
)
+
":"
+
str
(
minutes
)
+
":"
+
str
(
secondes
))
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment