not calculate weekends

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • abidoss
    replied
    Thanks

    Leave a comment:


  • rabii
    replied
    Just remove the line //this is for readibility
    try this instead
    Code:
    $numberOfDays = disponibilit;
    ic = ext\workingTime\addWorkingDays(datetime\now(), $numberOfDays);
    as yuri mentioned (Note that the working time calendar should be applied to the system (Administration > Settings > Working Time Calendar).)​

    Leave a comment:


  • abidoss
    commented on 's reply
    ic = datetime\diff(datetime\now(), disponibilit,'days') it works but it calculates over 7 days

    $numberOfDays = disponibilit ; // ceci juste pour la lisibilité
    ic = ext\workingTime\addWorkingDays(datetime\now(), $numberOfDays); it doesn't work it no longer calculates

  • rabii
    commented on 's reply
    what do you mean ? $numberOfdays is just a variable that holds the value of your field. make sure that you have the correct field name.

  • abidoss
    replied

    Leave a comment:


  • abidoss
    replied
    $numberOfDays not recognized in entity formula

    Leave a comment:


  • yuri
    replied
    Code:
    $numberOfDays = availability; // this just for readability
    
    ic = ext\workingTime\addWorkingDays(datetime\now(), $numberOfDays);
    Note that the working time calendar should be applied to the system (Administration > Settings > Working Time Calendar).

    Leave a comment:


  • abidoss
    replied
    Can you give me a correct formula?

    Leave a comment:


  • yuri
    replied
    Your formula from the first post it not supposed to take into account working calendar. You need to use other functions from the article.

    Leave a comment:


  • abidoss
    replied
    The settings are good, but it calculates the days week-end

    Leave a comment:


  • yuri
    commented on 's reply
    What does not work. Why we need to guess.

  • abidoss
    replied
    It does not work

    Leave a comment:


  • Kharg
    replied
    I think that you could use the working time calendar for this. Take a look:

    Leave a comment:


  • abidoss
    started a topic not calculate weekends

    not calculate weekends

    Hello

    How to add to this code of did not calculate weekends

    ic = datetime\diff(datetime\now(), availability, 'days')

Working...