Skip to content

Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.

495 B
Raw Blame
<?php

declare(strict_types=1);

namespace App\Enums\User;

use Carbon\CarbonInterface;

enum WeekStart: string
{
    case Sunday = 'sunday';
    case Monday = 'monday';

    public const DEFAULT = self::Monday;

    public function firstDay(): int
    {
        return $this === self::Sunday ? CarbonInterface::SUNDAY : CarbonInterface::MONDAY;
    }

    public function lastDay(): int
    {
        return $this === self::Sunday ? CarbonInterface::SATURDAY : CarbonInterface::SUNDAY;
    }
}