),
function($forecast) {
$forecastDayLocal = DateTimeImmutable::createFromMutable($forecast->time->from)->setTimezone(new DateTimeZone('Australia/Perth'));
- return (int)(new DateTimeImmutable())->format('d') + 1 == (int)$forecastDayLocal->format('d');
+ return (int)(new DateTimeImmutable)->format('d') + 1 == (int)$forecastDayLocal->format('d');
}
)));
$message = getTelegram()->getWebHookUpdates()->get('message') ? getTelegram()->getWebHookUpdates()->get('message')->get('text') : '';
if ($between = between(reveal($message ?? ''), '[taskid]')) {
- $monday = turnBackTime(new DateTimeImmutable());
+ $monday = turnBackTime(new DateTimeImmutable);
$completedTasksFile = getFilePathForWeek($monday->year, $monday->month, $monday->weekNum);
$completedTasks = file_exists($completedTasksFile) ? lines(trim(file_get_contents($completedTasksFile))) : [];
$tasksForTheWeek = getTasksForTheWeek(
protected $description = 'List tasks for this week';
public function handle($arguments) {
- $monday = turnBackTime(new DateTimeImmutable());
+ $monday = turnBackTime(new DateTimeImmutable);
$tasksForTheWeek = getTasksForTheWeek(
$monday->year,
$monday->month,
require_once('common.php');
$taskMatrix = require 'taskMatrix.php';
-$monday = turnBackTime(new DateTimeImmutable());
+$monday = turnBackTime(new DateTimeImmutable);
$taskLists = array_merge(
isStartOfSeason($monday->month, $monday->dayNum) ? [unlines(map(getString)(getTasksForTheSeason($monday->season, $taskMatrix)))] : [],
require_once('common.php');
$taskMatrix = require 'taskMatrix.php';
-$monday = turnBackTime(new DateTimeImmutable());
+$monday = turnBackTime(new DateTimeImmutable);
$extractTasks = function($tasks, $path) {
return array_merge($tasks, file_exists($path) ? lines(trim(file_get_contents($path))) : []);