• <bdo id='BDiNG'></bdo><ul id='BDiNG'></ul>
        <tfoot id='BDiNG'></tfoot>

      1. <i id='BDiNG'><tr id='BDiNG'><dt id='BDiNG'><q id='BDiNG'><span id='BDiNG'><b id='BDiNG'><form id='BDiNG'><ins id='BDiNG'></ins><ul id='BDiNG'></ul><sub id='BDiNG'></sub></form><legend id='BDiNG'></legend><bdo id='BDiNG'><pre id='BDiNG'><center id='BDiNG'></center></pre></bdo></b><th id='BDiNG'></th></span></q></dt></tr></i><div id='BDiNG'><tfoot id='BDiNG'></tfoot><dl id='BDiNG'><fieldset id='BDiNG'></fieldset></dl></div>
      2. <small id='BDiNG'></small><noframes id='BDiNG'>

        <legend id='BDiNG'><style id='BDiNG'><dir id='BDiNG'><q id='BDiNG'></q></dir></style></legend>

        PHP - 从时差中排除所有非营业时间/天

        PHP - Exclude all non-business hours / days from time difference(PHP - 从时差中排除所有非营业时间/天)

          <bdo id='j6gMF'></bdo><ul id='j6gMF'></ul>
        • <small id='j6gMF'></small><noframes id='j6gMF'>

          <tfoot id='j6gMF'></tfoot>
        • <i id='j6gMF'><tr id='j6gMF'><dt id='j6gMF'><q id='j6gMF'><span id='j6gMF'><b id='j6gMF'><form id='j6gMF'><ins id='j6gMF'></ins><ul id='j6gMF'></ul><sub id='j6gMF'></sub></form><legend id='j6gMF'></legend><bdo id='j6gMF'><pre id='j6gMF'><center id='j6gMF'></center></pre></bdo></b><th id='j6gMF'></th></span></q></dt></tr></i><div id='j6gMF'><tfoot id='j6gMF'></tfoot><dl id='j6gMF'><fieldset id='j6gMF'></fieldset></dl></div>

                  <tbody id='j6gMF'></tbody>
              1. <legend id='j6gMF'><style id='j6gMF'><dir id='j6gMF'><q id='j6gMF'></q></dir></style></legend>

                • 本文介绍了PHP - 从时差中排除所有非营业时间/天的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一张表格,显示了自提出工作以来的时间.

                  I have a table which shows the time since a job was raised.

                  // These are unix epoch times...
                  $raised = 1360947684;
                  $now = 1361192598;
                  $difference = 244914;
                  

                  $difference 需要排除工作时间以外的任何时间(例如,9-5 和周末).

                  $difference needs to exclude any time outside of business hours (ex, 9-5 and weekends).

                  我该如何解决这个问题?

                  How could I tackle this?

                  推荐答案

                  你要做的就是3个数字.

                  The thing you have to do are 3 in numbers.

                  1. 您取开始日期并计算这一天的休息时间(如果是工作日)
                  2. 您选择结束日期并计算这一天的时间,然后
                  3. 您将两者之间的天数乘以您的营业时间(只是那些,即营业日)

                  那你就完成了.

                  找到一个附加的小类,它可以做这些事情.注意没有错误处理、时区设置、夏令时……

                  Find a little class attached, which does those things. Be aware that there is no error handling, time zone settings, daylight saving time, ...

                  输入:

                  • 开始日期
                  • 结束日期

                  输出:

                  • 以秒为单位的时间差

                  可调常数:

                  • 营业时间
                  • 非工作日

                  这篇关于PHP - 从时差中排除所有非营业时间/天的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                        <i id='4mMHi'><tr id='4mMHi'><dt id='4mMHi'><q id='4mMHi'><span id='4mMHi'><b id='4mMHi'><form id='4mMHi'><ins id='4mMHi'></ins><ul id='4mMHi'></ul><sub id='4mMHi'></sub></form><legend id='4mMHi'></legend><bdo id='4mMHi'><pre id='4mMHi'><center id='4mMHi'></center></pre></bdo></b><th id='4mMHi'></th></span></q></dt></tr></i><div id='4mMHi'><tfoot id='4mMHi'></tfoot><dl id='4mMHi'><fieldset id='4mMHi'></fieldset></dl></div>

                            <bdo id='4mMHi'></bdo><ul id='4mMHi'></ul>
                          • <tfoot id='4mMHi'></tfoot>
                              <tbody id='4mMHi'></tbody>
                          • <small id='4mMHi'></small><noframes id='4mMHi'>

                            <legend id='4mMHi'><style id='4mMHi'><dir id='4mMHi'><q id='4mMHi'></q></dir></style></legend>