Statistics
1680
1
0
51d
Badges
Requirements

nette Calendar

![Travis] (https://travis-ci.org/JanGalek/netteCalendar.svg?branch=master) Total Downloads Latest Stable Version License Monthly Downloads

Extend Nette\Utils\DateTime() for Nette framework

Package Installation

The best way to install Nette Calendar is using Composer:

$ composer require galek/nette-calendar

Packagist - Versions

or manual edit composer.json in your project

"require": {
    "galek/nette-calendar": "^1.0"
}

Usage

    use \Galek\Utils\Calendar;

    $date = new Calendar();

    if($date->isWorkday()){
        echo "Today is workday :/";
    }

    if($date->isHoliday()){
        echo "Today is holiday :)";
    }

// Easter
    echo "Easter of this year is: ".$date->getEaster();
    echo "Easter of 2020 year is: ".$date->getEaster(2020);
    echo "Easter Monday of this year is: ".$date->getEasterMonday();
    echo "Easter Big Friday of this year is: ".$date->getBigFriday();

    echo "Today or next workday:".$date->getWorkday()->format('d.m.Y');
    echo "Next workday:".$date->getWorkday(true)->format('d.m.Y');

// Something for e-shops ;)
    echo "Date for shipping:".$date->getShippingTime()->format('d.m.Y');

    echo "Date for shipping to some Hour and minute:".$date->getShippingTime(14,20)->format('d.m.Y');
    /**
    * $date->getShippingTime(14,20)
    * Friday 9:30 < 14:20 = Monday
    * Friday 14:30 > 14:20 = Wednesday (Monday send)
    * etc...
    **/

No release at this moment. Try to create first one.

Is this addon outdated? Did you find an issue? Please report it.

Componette Componette admin@componette.com