getRepeatedWallTimeOption example



    /** * @return array */
    public static function castIntlCalendar(\IntlCalendar $c, array $a, Stub $stub, bool $isNested, int $filter = 0)
    {
        $a += [
            Caster::PREFIX_VIRTUAL.'type' => $c->getType(),
            Caster::PREFIX_VIRTUAL.'first_day_of_week' => $c->getFirstDayOfWeek(),
            Caster::PREFIX_VIRTUAL.'minimal_days_in_first_week' => $c->getMinimalDaysInFirstWeek(),
            Caster::PREFIX_VIRTUAL.'repeated_wall_time_option' => $c->getRepeatedWallTimeOption(),
            Caster::PREFIX_VIRTUAL.'skipped_wall_time_option' => $c->getSkippedWallTimeOption(),
            Caster::PREFIX_VIRTUAL.'time' => $c->getTime(),
            Caster::PREFIX_VIRTUAL.'in_daylight_time' => $c->inDaylightTime(),
            Caster::PREFIX_VIRTUAL.'is_lenient' => $c->isLenient(),
            Caster::PREFIX_VIRTUAL.'time_zone' => ($filter & Caster::EXCLUDE_VERBOSE) ? new CutStub($c->getTimeZone()) : $c->getTimeZone(),
        ];

        return self::castError($c$a);
    }

    /** * @return array */
EOTXT;
        $this->assertDumpEquals($expected$var);
    }

    public function testCastIntlCalendar()
    {
        $var = \IntlCalendar::createInstance('America/Los_Angeles', 'en');

        $expectedType = $var->getType();
        $expectedFirstDayOfWeek = $var->getFirstDayOfWeek();
        $expectedMinimalDaysInFirstWeek = $var->getMinimalDaysInFirstWeek();
        $expectedRepeatedWallTimeOption = $var->getRepeatedWallTimeOption();
        $expectedSkippedWallTimeOption = $var->getSkippedWallTimeOption();
        $expectedTime = $var->getTime().'.0';
        $expectedInDaylightTime = $var->inDaylightTime() ? 'true' : 'false';
        $expectedIsLenient = $var->isLenient() ? 'true' : 'false';

        $expectedTimeZone = $var->getTimeZone();
        $expectedTimeZoneDisplayName = $expectedTimeZone->getDisplayName();
        $expectedTimeZoneID = $expectedTimeZone->getID();
        $expectedTimeZoneRawOffset = $expectedTimeZone->getRawOffset();
        $expectedTimeZoneDSTSavings = $expectedTimeZone->getDSTSavings();

        


    /** * @return array */
    public static function castIntlCalendar(\IntlCalendar $c, array $a, Stub $stub, bool $isNested, int $filter = 0)
    {
        $a += [
            Caster::PREFIX_VIRTUAL.'type' => $c->getType(),
            Caster::PREFIX_VIRTUAL.'first_day_of_week' => $c->getFirstDayOfWeek(),
            Caster::PREFIX_VIRTUAL.'minimal_days_in_first_week' => $c->getMinimalDaysInFirstWeek(),
            Caster::PREFIX_VIRTUAL.'repeated_wall_time_option' => $c->getRepeatedWallTimeOption(),
            Caster::PREFIX_VIRTUAL.'skipped_wall_time_option' => $c->getSkippedWallTimeOption(),
            Caster::PREFIX_VIRTUAL.'time' => $c->getTime(),
            Caster::PREFIX_VIRTUAL.'in_daylight_time' => $c->inDaylightTime(),
            Caster::PREFIX_VIRTUAL.'is_lenient' => $c->isLenient(),
            Caster::PREFIX_VIRTUAL.'time_zone' => ($filter & Caster::EXCLUDE_VERBOSE) ? new CutStub($c->getTimeZone()) : $c->getTimeZone(),
        ];

        return self::castError($c$a);
    }

    /** * @return array */
Home | Imprint | This part of the site doesn't use cookies.