Giter VIP home page Giter VIP logo

business-hours's Introduction

Aeon

Minimum PHP Version License Tests Mutation testing badge

Time Management Framework for PHP

The word aeon /หˆiหษ’n/, also spelled eon (in American English), originally meant "life", "vital force" or "being", "generation" or "a period of time", though it tended to be translated as "age" in the sense of "ages", "forever", "timeless" or "for eternity".

Source: Wikipedia

Aeon is a set of libraries that makes easier to work with PHP Date & Time in elegant Object Oriented way.

business-hours's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

business-hours's Issues

Seasonal business days

I didn't find a way to create business hours for seasonal businesses. For example summer pub is opened every year from 1st of April to last of September. Maybe, I missed something and it's already possible. Anyway, @norberttech do you think it should be a part of aeon-php/business-hours or not?

Calculating the X business days from a given day

Hi,

I asked on the forum about it, but because of no answer I decided to ask about it also here.

Describe the feature
I would like to have a method in the library which would be able to calculate the date by adding eg: 5 business days to passed day. I noticed that I have to duplicate that part of code when needed in different contexts/applications, but I think that the library could do something like that.

Expected behavior
Probably the code would be the best explanation of the behavior:

public function nextBusinessDays(Day $day, int $businessDays, int $maximumDays = 365) : Day
{
    $nextBusinessDay = $day;

    for ($i = 1; $i <= $businessDays; $i++) {
        $nextBusinessDay = $this->nextBusinessDay($nextBusinessDay, $maximumDays);
    }

    return $nextBusinessDay;
}

Iโ€™ll need to find a better name for that method. Let me know, what do you think about it.

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.