mirror of
https://github.com/davidkeegan/dklrt
synced 2025-01-13 08:01:58 +01:00
WIP: hour precision.
This commit is contained in:
parent
a894537691
commit
8c031da5f9
2 changed files with 4 additions and 4 deletions
6
Time.py
6
Time.py
|
@ -23,9 +23,9 @@ def _Throw(Msg): Misc.Throw(Msg, ModuleName)
|
||||||
def DateParse(Datestr):
|
def DateParse(Datestr):
|
||||||
"""Converts a date string to seconds since the epoch."""
|
"""Converts a date string to seconds since the epoch."""
|
||||||
Fs = DateFormat;
|
Fs = DateFormat;
|
||||||
if length(Datestr) > 16 : Fs = DateFormatHms;
|
if len(Datestr) > 16 : Fs = DateFormatHms;
|
||||||
elif length(Datestr) > 13 : Fs = DateFormatHm;
|
elif len(Datestr) > 13 : Fs = DateFormatHm;
|
||||||
elif length(Datestr) > 10 : Fs = DateFormatH;
|
elif len(Datestr) > 10 : Fs = DateFormatH;
|
||||||
return mktime(strptime(Datestr, Fs))
|
return mktime(strptime(Datestr, Fs))
|
||||||
|
|
||||||
def DateToText(Seconds):
|
def DateToText(Seconds):
|
||||||
|
|
2
dklrt.el
2
dklrt.el
|
@ -70,7 +70,7 @@ transaction date."
|
||||||
|
|
||||||
; Hard-coded alternative value for debug only.
|
; Hard-coded alternative value for debug only.
|
||||||
(or dklrt-PackageDirectory
|
(or dklrt-PackageDirectory
|
||||||
(setq dklrt-PackageDirectory "/opt/dk/emacs/dklrt-20131028.1025/"))
|
(setq dklrt-PackageDirectory "/opt/dk/emacs/dklrt-20131028.1129/"))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun dklrt-SetCcKeys()
|
(defun dklrt-SetCcKeys()
|
||||||
|
|
Loading…
Reference in a new issue