Created
March 28, 2020 05:54
-
-
Save BlurryLight/29fe3249b86c5cf11dca29a1d58911cb to your computer and use it in GitHub Desktop.
fcitx-date
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function LookupDate(input) | |
local fmt | |
if input == '' then | |
fmt = "%Y年%m月%d日" | |
elseif input == 't' then | |
fmt = "%Y-%m-%d %H:%M:%S" | |
elseif input == 'd' then | |
fmt = "%Y-%m-%d" | |
end | |
return os.date(fmt) | |
end | |
ime.register_command("dt", "LookupDate", "日期时间输入") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment