PHP code example of flying / date

1. Go to this page and download the library: Download flying/date library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

flying / date example snippets


$mutableDateTime = \DateTime::createFromImmutable($immutableDateTime); 

\Flying\Date\Date::now(): \DateTimeImmutable

\Flying\Date\Date::from(\DateTimeInterface|\DateInterval|string $date, \DateTimeZone|string|null $timezone = null): \DateTimeImmutable
 

\Flying\Date\Date::fromFormat(string $format, string $datetime, \DateTimeZone|string|null $timezone = null): \DateTimeImmutable|bool

\Flying\Date\Date::getTimezone(): \DateTimeZone
 

\Flying\Date\Date::setTimezone(\DateTimeZone|string|null $timezone = null): void
 

\Flying\Date\Date::adjust(\DateInterval|\DateTimeInterface|string|null $adjustment = null): void
 

\Flying\Date\Date::getAdjustment(): ?\DateInterval
 

\Flying\Date\Date::allowAdjustment(bool $status): void
 

\Flying\Date\Date::isAdjustmentAllowed(): bool