Git Product home page Git Product logo

nettecalendar's Introduction

nette Calendar

Travis Total Downloads Latest Stable Version License Monthly Downloads Coverage Status

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

Documentation

Learn more in the documentation and czech version of documentation.

Migration and changelog 1.x -> 2.x documentation and czech version of documentation.

Future

This repository will be rewrite to https://github.com/DateTi for smallest repositories and will use more interfaces ;)

nettecalendar's People

Contributors

jangalek avatar cubic avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.