Skip to content

Instantly share code, notes, and snippets.

@BlurryLight
Created March 28, 2020 05:54
Show Gist options
  • Save BlurryLight/29fe3249b86c5cf11dca29a1d58911cb to your computer and use it in GitHub Desktop.
Save BlurryLight/29fe3249b86c5cf11dca29a1d58911cb to your computer and use it in GitHub Desktop.
fcitx-date
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