forked from lolcat/4get
some misc. oracles stuff (fixes/features) (#15)
fix a small calc.php bug, and add date information to the time module. the changes have been sitting on a branch for like a week, so I figured I'd cherry-pick them over to this branch for a PR. [as always, these changes are live on my instance.](https://4get.silly.computer/web?s=what+is+the+date&scraper=yandex&nsfw=yes) Reviewed-on: lolcat/4get#15 Co-authored-by: cynic <admin@cynic.moe> Co-committed-by: cynic <admin@cynic.moe>
This commit is contained in:
@@ -8,7 +8,7 @@ class time extends oracle {
|
||||
$prompts = [
|
||||
"what", "time", "is", "it",
|
||||
"right", "now", "the", "current",
|
||||
"get"
|
||||
"get", "date"
|
||||
];
|
||||
$q = str_replace(",", "", $q);
|
||||
$q = str_replace("?", "", $q);
|
||||
@@ -37,6 +37,7 @@ class time extends oracle {
|
||||
date_default_timezone_set($timezone);
|
||||
return [
|
||||
"The time in ".$timezone => date("H:i:s"),
|
||||
" " => date("l, F jS"),
|
||||
"" => "include the string \"tz:XXX\" to use timezone XXX"
|
||||
];
|
||||
}
|
||||
|
Reference in New Issue
Block a user