add time and date

This commit is contained in:
adb 2021-02-12 04:04:23 +01:00
parent 08b356dd0a
commit 57aeac53d9
2 changed files with 15 additions and 0 deletions

View File

@ -92,6 +92,7 @@ export default {
.white{color: #fff;} .white{color: #fff;}
.green{color: #44dd88;} .green{color: #44dd88;}
.blue{color: #0081b1;} .blue{color: #0081b1;}
.red{color: #ac311c;}
input{ input{
background-color: #0000; background-color: #0000;
border: 0; border: 0;

View File

@ -82,6 +82,20 @@ let commands = [
{color: "white", content: "meet", delay: 500}, {color: "white", content: "meet", delay: 500},
] ]
}, },
{
name: "time",
output(){ return[
{color: "white", content: "your current time is: ", delay: 100},
{color: "blue", content: function(){return new Date().toLocaleTimeString()}(), delay: 200},
]}
},
{
name: "date",
output(){ return[
{color: "white", content: "your current date is: ", delay: 100},
{color: "blue", content: function(){return new Date().toLocaleDateString()}(), delay: 200},
]}
},
{ {
name: ["social", "mastodon", "Mastodon", "mstdn"], name: ["social", "mastodon", "Mastodon", "mstdn"],
output:[ output:[