mirror of
https://github.com/davidkeegan/dklrt
synced 2024-12-25 09:59:19 +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):
|
||||
"""Converts a date string to seconds since the epoch."""
|
||||
Fs = DateFormat;
|
||||
if length(Datestr) > 16 : Fs = DateFormatHms;
|
||||
elif length(Datestr) > 13 : Fs = DateFormatHm;
|
||||
elif length(Datestr) > 10 : Fs = DateFormatH;
|
||||
if len(Datestr) > 16 : Fs = DateFormatHms;
|
||||
elif len(Datestr) > 13 : Fs = DateFormatHm;
|
||||
elif len(Datestr) > 10 : Fs = DateFormatH;
|
||||
return mktime(strptime(Datestr, Fs))
|
||||
|
||||
def DateToText(Seconds):
|
||||
|
|
2
dklrt.el
2
dklrt.el
|
@ -70,7 +70,7 @@ transaction date."
|
|||
|
||||
; Hard-coded alternative value for debug only.
|
||||
(or dklrt-PackageDirectory
|
||||
(setq dklrt-PackageDirectory "/opt/dk/emacs/dklrt-20131028.1025/"))
|
||||
(setq dklrt-PackageDirectory "/opt/dk/emacs/dklrt-20131028.1129/"))
|
||||
|
||||
;;;###autoload
|
||||
(defun dklrt-SetCcKeys()
|
||||
|
|
Loading…
Reference in a new issue