This repository has been archived on 2021-04-24. You can view files and clone it, but cannot push or open issues or pull requests.
Mikubot/plugins/date.lua

36 lines
1.2 KiB
Lua
Raw Normal View History

function run(msg, matches)
2015-07-08 21:26:54 +02:00
text = os.date("Heute ist %A, der %d. %B %Y und es ist %H:%M:%S Uhr [%p]")
2015-07-07 14:26:58 +02:00
-- Days
text = string.gsub(text, "Monday", "Montag")
text = string.gsub(text, "Tuesday", "Dienstag")
text = string.gsub(text, "Wednesday", "Mittwoch")
text = string.gsub(text, "Thursday", "Donnerstag")
text = string.gsub(text, "Friday", "Freitag")
text = string.gsub(text, "Saturday", "Samsstag")
text = string.gsub(text, "Sunday", "Sonntag")
-- Months
text = string.gsub(text, "January", "Januar")
text = string.gsub(text, "February", "Februar")
text = string.gsub(text, "March", "März")
text = string.gsub(text, "April", "April")
text = string.gsub(text, "May", "Mai")
text = string.gsub(text, "June", "Juni")
text = string.gsub(text, "July", "Juli")
text = string.gsub(text, "August", "August")
text = string.gsub(text, "September", "September")
text = string.gsub(text, "October", "Oktober")
text = string.gsub(text, "November", "November")
text = string.gsub(text, "December", "Dezember")
return text
end
return {
2015-06-10 19:02:41 +02:00
description = "Zeigt das aktuelle Datum und Zeit an",
usage = {"/date"},
2015-07-07 14:26:58 +02:00
patterns = {"^/[D|d]ate$","^/[D|d]atum$"},
run = run
}
2015-07-07 14:26:58 +02:00
--by Akamaru [https://ponywave.de]