Subversion Repositories qbpwcf-lib(archive)

Rev

Rev 911 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php

/*

        QBPWCF, Quick Build PHP website Component base on Fedora Linux.
    Copyright (C) 2015~2024 Min-Jhin,Chen

    This file is part of QBPWCF.

    QBPWCF is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    QBPWCF is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with QBPWCF.  If not, see <http://www.gnu.org/licenses/>.

*/
namespace qbpwcf;

/*
類別說明:
跟時間應用相關的類別.
備註:
無.
*/
class time{

        /*
        #函式說明:
        #當前類別被呼叫的靜態方法不存在時,將會執行該函數,回報該方法不存在.
        #回傳結果:
        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
        #$reuslt["error"],執行不正常結束的錯訊息陣列.
        #$result["function"],當前執行的函式名稱.
        #必填參數:
        #$method,物件,為物件實體或類別名稱,會自動置入該參數.
        #$arguments,陣列,為呼叫方法時所用的參數.
        #可省略參數:
        #無.
        #參考資料:
        #__call=>http://php.net/manual/en/language.oop5.overloading.php#object.callstatic
        #備註;
        #無.
        */
        public function __call($method,$arguments){
                
                #取得當前執行的函式
                $result["function"]=__FUNCTION__;
                
                #設置執行不正常
                $result["status"]="false";
                
                #設置執行錯誤
                $result["error"][]=__NAMESPACE__ ."/".$method."() 不存在!";
                
                #設置所丟入的參數
                $result["error"][]=$arguments;
                
                #回傳結果
                return $result;
                
                }#function __call end
                
        /*
        #函式說明:
        #當前類別被呼叫的靜態方法不存在時,將會執行該函數,回報該方法不存在.
        #回傳結果:
        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
        #$reuslt["error"],執行不正常結束的錯訊息陣列.
        #$result["function"],當前執行的函式名稱.
        #必填參數:
        #$method,物件,為物件實體或類別名稱,會自動置入該參數.
        #$arguments,陣列,為呼叫方法時所用的參數.
        #可省略參數:
        #無.
        #參考資料:
        #__callStatic=>http://php.net/manual/en/language.oop5.overloading.php#object.callstatic
        #備註:
        #無.
        */
        public static function __callStatic($method,$arguments){
                
                #取得當前執行的函式
                $result["function"]=__FUNCTION__;
                
                #設置執行不正常
                $result["status"]="false";
                
                #設置執行錯誤
                $result["error"][]="欲呼叫的". __NAMESPACE__ ."/".$method."() 不存在!";
                
                #設置所丟入的參數
                $result["error"][]=$arguments;
                
                #回傳結果
                return $result;
                
                }#function __callStatic end
        
        /*
        #函式說明:
        #設定時區.
        #回傳結果:
        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
        #$reuslt["error"],執行不正常結束的錯訊息陣列.
        #$result["function"],當前執行的函式名稱.
        #必填參數:
        #$conf["timeZone"],字串,時區代號,可以設定的時區列表:「http://www.php.net/manual/en/timezones.php」,台灣可用"Asia/Taipei",協調世界時用"UTC".
        $conf["timeZone"]="Asia/Taipei";
        #可省略參數:
        #無.
        #參考資料:
        #UTC=>http://pansci.asia/archives/84978
        #備註:
        #無.
        */
        public static function setTimeZone(&$conf){

                #初始化要回傳的結果
                $result=array();
                
                #設置當其函數名稱
                $result["function"]=__FUNCTION__;
                
                #如果 $conf 不為陣列
                if(gettype($conf)!="array"){
                        
                        #設置執行失敗
                        $result["status"]="false";
                        
                        #設置執行錯誤訊息
                        $result["error"][]="\$conf變數須為陣列形態";

                        #如果傳入的參數為 null
                        if($conf==null){
                                
                                #設置執行錯誤訊息
                                $result["error"][]="\$conf變數不得為null,請檢查函數「".$result["function"]."」的參數設置有無正確!";
                                
                                }#if end

                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #檢查參數
                #函式說明:
                #檢查必填與可省略的參數,可省略參數可指定預設要給與什麼數值內容。
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$reuslt["error"],執行不正常結束的錯訊息陣列.
                #$result["function"],當前執行的函式名稱.
                #$result["passed"],識別要檢查的全體變數是否存在以及型態是否正確的變數,"true"代表檢查全部通過;"false"代表檢查不通過
                #$result[$shouldBtCheckedVarName]["varExist"],所檢查的變數是否存在,"false"代表不存在;"true"代表存在
                #$result[$shouldBtCheckedVarName]["varType"],所檢查的變數型態是否正確,"false"代表錯誤;"true"代表正確
                #$result[$shouldBtCheckedVarName]["error"],每個參數設定的錯誤訊息
                #$result["argu"],字串陣列,目前輸入的參數名稱陣列.
                #$result["legalVarName"],字串陣列,合法可用的參數名稱陣列.
                #$result["notNeedVar"],字串陣列,多餘的參數名稱.
                #必填寫的參數:
                #$conf["varInput"],陣列變數,要檢查的陣列變數,請在要檢查的參數前面加上&,這樣變動的結果才能被套用。
                $conf["variableCheck::checkArguments"]["varInput"]=&$conf;
                #$conf["mustBeFilledVariableName"],爲必填參數的變數名稱陣列,形態爲陣列變數,例如: $conf["mustBeFilledVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableName"]=array("timeZone");
                #$conf["mustBeFilledVariableType"],爲必填參數的變數陣列應該爲何種變數形態,形態爲陣列 例如: $conf["mustBeFilledVariableType"] = array("string",integer,"double"); 
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableType"]=array("string");
                #$conf["referenceVarKey"],字串,$conf參數後面的key值,用於移除不要的參考陣列.
                $conf["variableCheck::checkArguments"]["referenceVarKey"]="variableCheck::checkArguments";
                #可以省略的參數:
                #$conf["canBeEmptyString"],必填變數內容如果是空字串就不能算是有設置的話,請設為"false",預設爲"true"。
                $conf["variableCheck::checkArguments"]["canBeEmptyString"]="false";
                #$conf["skipableVariableName"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableName"] = array("id","account","password");
                #$conf["variableCheck::checkArguments"]["skipableVariableName"]=array("showSecond");
                #$conf["skipableVariableType"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableType"] = array("string",integer,"double"); 
                #$conf["variableCheck::checkArguments"]["skipableVariableType"]=array("string");
                #$conf["skipableVarDefaultValue"],字串陣列,每個不存在的可省略變數要初始化為什麼,null與代表不指定,若預設值是必填參數之一,請將$conf["mustBeFilledVar"]改成"\$conf["\mustBeFilledVar\"]".
                #$conf["variableCheck::checkArguments"]["skipableVarDefaultValue"]=array("true");
                #$conf["arrayCountEqualCheck"],字串陣列,為檢查哪些陣列參數的元素數量要一樣,$conf["arrayCountEqualCheck"][$i]=array()為第$i組key為哪些的變數其元素數量要相等.
                #$conf["arrayCountEqualCheck"][]=array();
                #參考資料來源:
                #array_keys=>http://php.net/manual/en/function.array-keys.php
                $checkResult=variableCheck::checkArguments($conf["variableCheck::checkArguments"]);
                unset($conf["variableCheck::checkArguments"]);
                                        
                #如果檢查失敗
                if($checkResult["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                        
                #如果檢查不通過
                if($checkResult["passed"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
        
                #如果設定時區失敗
                if(date_default_timezone_set($conf["timeZone"])==FALSE){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"][]="設定時區為「".$conf["timeZone"]."」失敗";
                        
                        #回傳結果
                        return $result;
                        
                        }#if end

                #執行到這邊代表正確無誤
                
                #設置執行正常
                $result["status"]="true";
                
                #回傳結果
                return $result;

                }#function setTimeZone end

        /*
        #函式說明:
        #取得系統時間目前的西元年、月、日、時、分、秒.
        #回傳結果:
        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
        #$reuslt["error"],執行不正常結束的錯訊息陣列.
        #$result["function"],當前執行的函式名稱.
        #$result["thisWestYear"],當前西元年
        #$result["thisMonth"],當前月份
        #$result["weekDay"],為一個星期的第幾天,0代表第一天(星期日),6代表第七天(星期六)
        #$result["thisDay"],當前日
        #$result["thisHour"],當前小時
        #$result["thisMin"],當前分鐘
        #$result["thisSec"],當前秒數
        #必填參數:
        #$conf["timeZone"],字串,時區代號,可以設定的時區列表:「http://www.php.net/manual/en/timezones.php」,台灣可用"Asia/Taipei".
        $conf["timeZone"]="Asia/Tpipei";
        #可省略參數:
        #無.
        #參考資料:
        #php的date函數用法=>http://php.net/manual/en/function.date.php
        #備註:
        #無.
        */
        public static function getSystemDateAndTime(&$conf){
        
                #初始化要回傳的結果
                $result=array();
                
                #設置當其函數名稱
                $result["function"]=__FUNCTION__;
                
                #如果 $conf 不為陣列
                if(gettype($conf)!="array"){
                        
                        #設置執行失敗
                        $result["status"]="false";
                        
                        #設置執行錯誤訊息
                        $result["error"][]="\$conf變數須為陣列形態";

                        #如果傳入的參數為 null
                        if($conf==null){
                                
                                #設置執行錯誤訊息
                                $result["error"][]="\$conf變數不得為null,請檢查函數「".$result["function"]."」的參數設置有無正確!";
                                
                                }#if end

                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #檢查參數
                #函式說明:
                #檢查必填與可省略的參數,可省略參數可指定預設要給與什麼數值內容。
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$reuslt["error"],執行不正常結束的錯訊息陣列.
                #$result["function"],當前執行的函式名稱.
                #$result["passed"],識別要檢查的全體變數是否存在以及型態是否正確的變數,"true"代表檢查全部通過;"false"代表檢查不通過
                #$result[$shouldBtCheckedVarName]["varExist"],所檢查的變數是否存在,"false"代表不存在;"true"代表存在
                #$result[$shouldBtCheckedVarName]["varType"],所檢查的變數型態是否正確,"false"代表錯誤;"true"代表正確
                #$result[$shouldBtCheckedVarName]["error"],每個參數設定的錯誤訊息
                #$result["argu"],字串陣列,目前輸入的參數名稱陣列.
                #$result["legalVarName"],字串陣列,合法可用的參數名稱陣列.
                #$result["notNeedVar"],字串陣列,多餘的參數名稱.
                #必填寫的參數:
                #$conf["varInput"],陣列變數,要檢查的陣列變數,請在要檢查的參數前面加上&,這樣變動的結果才能被套用。
                $conf["variableCheck::checkArguments"]["varInput"]=&$conf;
                #$conf["mustBeFilledVariableName"],爲必填參數的變數名稱陣列,形態爲陣列變數,例如: $conf["mustBeFilledVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableName"]=array("timeZone");
                #$conf["mustBeFilledVariableType"],爲必填參數的變數陣列應該爲何種變數形態,形態爲陣列 例如: $conf["mustBeFilledVariableType"] = array("string",integer,"double"); 
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableType"]=array("string");
                #$conf["referenceVarKey"],字串,$conf參數後面的key值,用於移除不要的參考陣列.
                $conf["variableCheck::checkArguments"]["referenceVarKey"]="variableCheck::checkArguments";
                #可以省略的參數:
                #$conf["canBeEmptyString"],必填變數內容如果是空字串就不能算是有設置的話,請設為"false",預設爲"true"。
                $conf["variableCheck::checkArguments"]["canBeEmptyString"]="false";
                #$conf["skipableVariableName"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableName"] = array("id","account","password");
                #$conf["variableCheck::checkArguments"]["skipableVariableName"]=array("showSecond");
                #$conf["skipableVariableType"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableType"] = array("string",integer,"double"); 
                #$conf["variableCheck::checkArguments"]["skipableVariableType"]=array("string");
                #$conf["skipableVarDefaultValue"],字串陣列,每個不存在的可省略變數要初始化為什麼,null與代表不指定,若預設值是必填參數之一,請將$conf["mustBeFilledVar"]改成"\$conf["\mustBeFilledVar\"]".
                #$conf["variableCheck::checkArguments"]["skipableVarDefaultValue"]=array("true");
                #$conf["arrayCountEqualCheck"],字串陣列,為檢查哪些陣列參數的元素數量要一樣,$conf["arrayCountEqualCheck"][$i]=array()為第$i組key為哪些的變數其元素數量要相等.
                #$conf["arrayCountEqualCheck"][]=array();
                #參考資料來源:
                #array_keys=>http://php.net/manual/en/function.array-keys.php
                $checkResult=variableCheck::checkArguments($conf["variableCheck::checkArguments"]);
                unset($conf["variableCheck::checkArguments"]);
                                        
                #如果檢查失敗
                if($checkResult["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                        
                #如果檢查不通過
                if($checkResult["passed"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
        
                #設定時區
                #函式說明:
                #設定時區.
                #回傳結果:
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$reuslt["error"],執行不正常結束的錯訊息陣列.
                #$result["function"],當前執行的函式名稱.
                #必填參數:
                #$conf["timeZone"],字串,時區代號,可以設定的時區列表:「http://www.php.net/manual/en/timezones.php」,台灣可用"Asia/Taipei".
                $conf["time::setTimeZone"]["timeZone"]=$conf["timeZone"];
                $setTimeZone=time::setTimeZone($conf["time::setTimeZone"]);
                unset($conf["time::setTimeZone"]);
                
                #如果設置時區失敗
                if($setTimeZone["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$setTimeZone;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #取得西元年
                $result["thisWestYear"]=date('Y');

                #取得月份,加0使得0X變成X
                $result["thisMonth"]=date('m')+0;

                #取得星期
                $result["weekDay"]=date('w');

                #取得日,加0使得0X變成X
                $result["thisDay"]=(string)(int)date('d')+0;

                #取得小時
                $result["thisHour"]=date('H')+0;

                #取得分鐘
                $result["thisMin"]=date('i')+0;

                #取得秒數
                $result["thisSec"]=date('s')+0;

                #設置執行正常 
                $result["status"]="true";

                #回傳結果
                return $result;

                }#function getSystemDateAndTime end

        /*      
        #函式說明:
        #回傳RFC822格式的當前時間,格式會像這種 「Wed, 25 Jan 12 19:13:15 +0800」
        #回傳結果:
        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
        #$reuslt["error"],執行不正常結束的錯訊息陣列.
        #$result["function"],當前執行的函式名稱.
        #$result["content"],RFC822格式的時間.
        #必填參數:
        #$conf["timeZone"],字串,時區代號,可以設定的時區列表:「http://www.php.net/manual/en/timezones.php」,台灣可用"Asia/Taipei".
        $conf["timeZone"]="Asia/Taipei";
        #可省略參數:
        #無.
        #參考資料:
        #無.
        #備註:
        #無.
        */
        public static function get_RFC822_Time(&$conf){
        
                #初始化要回傳的結果
                $result=array();
                
                #設置當其函數名稱
                $result["function"]=__FUNCTION__;
                
                #如果 $conf 不為陣列
                if(gettype($conf)!="array"){
                        
                        #設置執行失敗
                        $result["status"]="false";
                        
                        #設置執行錯誤訊息
                        $result["error"][]="\$conf變數須為陣列形態";

                        #如果傳入的參數為 null
                        if($conf==null){
                                
                                #設置執行錯誤訊息
                                $result["error"][]="\$conf變數不得為null,請檢查函數「".$result["function"]."」的參數設置有無正確!";
                                
                                }#if end

                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #檢查參數
                #函式說明:
                #檢查必填與可省略的參數,可省略參數可指定預設要給與什麼數值內容。
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$reuslt["error"],執行不正常結束的錯訊息陣列.
                #$result["function"],當前執行的函式名稱.
                #$result["passed"],識別要檢查的全體變數是否存在以及型態是否正確的變數,"true"代表檢查全部通過;"false"代表檢查不通過
                #$result[$shouldBtCheckedVarName]["varExist"],所檢查的變數是否存在,"false"代表不存在;"true"代表存在
                #$result[$shouldBtCheckedVarName]["varType"],所檢查的變數型態是否正確,"false"代表錯誤;"true"代表正確
                #$result[$shouldBtCheckedVarName]["error"],每個參數設定的錯誤訊息
                #$result["argu"],字串陣列,目前輸入的參數名稱陣列.
                #$result["legalVarName"],字串陣列,合法可用的參數名稱陣列.
                #$result["notNeedVar"],字串陣列,多餘的參數名稱.
                #必填寫的參數:
                #$conf["varInput"],陣列變數,要檢查的陣列變數,請在要檢查的參數前面加上&,這樣變動的結果才能被套用。
                $conf["variableCheck::checkArguments"]["varInput"]=&$conf;
                #$conf["mustBeFilledVariableName"],爲必填參數的變數名稱陣列,形態爲陣列變數,例如: $conf["mustBeFilledVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableName"]=array("timeZone");
                #$conf["mustBeFilledVariableType"],爲必填參數的變數陣列應該爲何種變數形態,形態爲陣列 例如: $conf["mustBeFilledVariableType"] = array("string",integer,"double"); 
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableType"]=array("string");
                #$conf["referenceVarKey"],字串,$conf參數後面的key值,用於移除不要的參考陣列.
                $conf["variableCheck::checkArguments"]["referenceVarKey"]="variableCheck::checkArguments";
                #可以省略的參數:
                #$conf["canBeEmptyString"],必填變數內容如果是空字串就不能算是有設置的話,請設為"false",預設爲"true"。
                $conf["variableCheck::checkArguments"]["canBeEmptyString"]="false";
                #$conf["skipableVariableName"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableName"] = array("id","account","password");
                #$conf["variableCheck::checkArguments"]["skipableVariableName"]=array("showSecond");
                #$conf["skipableVariableType"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableType"] = array("string",integer,"double"); 
                #$conf["variableCheck::checkArguments"]["skipableVariableType"]=array("string");
                #$conf["skipableVarDefaultValue"],字串陣列,每個不存在的可省略變數要初始化為什麼,null與代表不指定,若預設值是必填參數之一,請將$conf["mustBeFilledVar"]改成"\$conf["\mustBeFilledVar\"]".
                #$conf["variableCheck::checkArguments"]["skipableVarDefaultValue"]=array("true");
                #$conf["arrayCountEqualCheck"],字串陣列,為檢查哪些陣列參數的元素數量要一樣,$conf["arrayCountEqualCheck"][$i]=array()為第$i組key為哪些的變數其元素數量要相等.
                #$conf["arrayCountEqualCheck"][]=array();
                #參考資料來源:
                #array_keys=>http://php.net/manual/en/function.array-keys.php
                $checkResult=variableCheck::checkArguments($conf["variableCheck::checkArguments"]);
                unset($conf["variableCheck::checkArguments"]);
                                        
                #如果檢查失敗
                if($checkResult["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                        
                #如果檢查不通過
                if($checkResult["passed"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
        
                #設定時區
                #函式說明:
                #設定時區.
                #回傳結果:
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$reuslt["error"],執行不正常結束的錯訊息陣列.
                #$result["function"],當前執行的函式名稱.
                #必填參數:
                #$conf["timeZone"],字串,時區代號,可以設定的時區列表:「http://www.php.net/manual/en/timezones.php」,台灣可用"Asia/Taipei".
                $conf["time::setTimeZone"]["timeZone"]=$conf["timeZone"];
                $setTimeZone=time::setTimeZone($conf["time::setTimeZone"]);
                unset($conf["time::setTimeZone"]);
                
                #如果設置時區失敗
                if($setTimeZone["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$setTimeZone;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end

                #設置執行正常
                $result["status"]="true";
                
                #取得 RFC822 格式的時間
                #格式設定:http://tw.php.net/manual/en/function.date.php
                $result["content"]=date(DATE_RFC822);

                #回傳結果
                return $result;
                
                }#function get_RFC822_Time end

        /*
        #函式說明:
        #回傳西元的目前時間,格式為2010年07月24日15時30分33秒
        #回傳結果:
        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
        #$reuslt["error"],執行不正常結束的錯訊息陣列.
        #$result["function"],當前執行的函式名稱.
        #$result["content"],西元的目前時間,格式為2010年07月24日15時30分33秒
        #必填參數:
        #$conf["timeZone"],字串,時區代號,可以設定的時區列表:http://www.php.net/manual/en/timezones.php, ex:"Asia/Taipei".
        $conf["timeZone"]="Asia/Taipei";
        #可省略參數:
        #$conf["showSecond"],字串,若爲"true"則會顯示秒數,預設為"true".     
        #$conf["showSecond"]="true";
        #參考資料:
        #date函數用法=>http://php.net/manual/en/function.date.php.
        #備註:
        #無.
        */
        public static function getFullDateAndTime(&$conf){
        
                #初始化要回傳的結果
                $result=array();
                
                #設置當其函數名稱
                $result["function"]=__FUNCTION__;
                
                #如果 $conf 不為陣列
                if(gettype($conf)!="array"){
                        
                        #設置執行失敗
                        $result["status"]="false";
                        
                        #設置執行錯誤訊息
                        $result["error"][]="\$conf變數須為陣列形態";

                        #如果傳入的參數為 null
                        if($conf==null){
                                
                                #設置執行錯誤訊息
                                $result["error"][]="\$conf變數不得為null,請檢查函數「".$result["function"]."」的參數設置有無正確!";
                                
                                }#if end

                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #檢查參數
                #函式說明:
                #檢查必填與可省略的參數,可省略參數可指定預設要給與什麼數值內容。
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$reuslt["error"],執行不正常結束的錯訊息陣列.
                #$result["function"],當前執行的函式名稱.
                #$result["passed"],識別要檢查的全體變數是否存在以及型態是否正確的變數,"true"代表檢查全部通過;"false"代表檢查不通過
                #$result[$shouldBtCheckedVarName]["varExist"],所檢查的變數是否存在,"false"代表不存在;"true"代表存在
                #$result[$shouldBtCheckedVarName]["varType"],所檢查的變數型態是否正確,"false"代表錯誤;"true"代表正確
                #$result[$shouldBtCheckedVarName]["error"],每個參數設定的錯誤訊息
                #$result["argu"],字串陣列,目前輸入的參數名稱陣列.
                #$result["legalVarName"],字串陣列,合法可用的參數名稱陣列.
                #$result["notNeedVar"],字串陣列,多餘的參數名稱.
                #必填寫的參數:
                #$conf["varInput"],陣列變數,要檢查的陣列變數,請在要檢查的參數前面加上&,這樣變動的結果才能被套用。
                $conf["variableCheck::checkArguments"]["varInput"]=&$conf;
                #$conf["mustBeFilledVariableName"],爲必填參數的變數名稱陣列,形態爲陣列變數,例如: $conf["mustBeFilledVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableName"]=array("timeZone");
                #$conf["mustBeFilledVariableType"],爲必填參數的變數陣列應該爲何種變數形態,形態爲陣列 例如: $conf["mustBeFilledVariableType"] = array("string",integer,"double"); 
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableType"]=array("string");
                #$conf["referenceVarKey"],字串,$conf參數後面的key值,用於移除不要的參考陣列.
                $conf["variableCheck::checkArguments"]["referenceVarKey"]="variableCheck::checkArguments";
                #可以省略的參數:
                #$conf["canBeEmptyString"],必填變數內容如果是空字串就不能算是有設置的話,請設為"false",預設爲"true"。
                $conf["variableCheck::checkArguments"]["canBeEmptyString"]="false";
                #$conf["skipableVariableName"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["skipableVariableName"]=array("showSecond");
                #$conf["skipableVariableType"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableType"] = array("string",integer,"double"); 
                $conf["variableCheck::checkArguments"]["skipableVariableType"]=array("string");
                #$conf["skipableVarDefaultValue"],字串陣列,每個不存在的可省略變數要初始化為什麼,null與代表不指定,若預設值是必填參數之一,請將$conf["mustBeFilledVar"]改成"\$conf["\mustBeFilledVar\"]".
                $conf["variableCheck::checkArguments"]["skipableVarDefaultValue"]=array("true");
                #$conf["arrayCountEqualCheck"],字串陣列,為檢查哪些陣列參數的元素數量要一樣,$conf["arrayCountEqualCheck"][$i]=array()為第$i組key為哪些的變數其元素數量要相等.
                #$conf["arrayCountEqualCheck"][]=array();
                #參考資料來源:
                #array_keys=>http://php.net/manual/en/function.array-keys.php
                $checkResult=variableCheck::checkArguments($conf["variableCheck::checkArguments"]);
                unset($conf["variableCheck::checkArguments"]);
                                        
                #如果檢查失敗
                if($checkResult["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                        
                #如果檢查不通過
                if($checkResult["passed"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
        
                #設定時區
                $conf_setTimeZone["timeZone"]=$conf["timeZone"];
                $setTimeZone=time::setTimeZone($conf_setTimeZone);
                unset($conf_setTimeZone);
                
                #如果設置時區失敗
                if($setTimeZone["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$setTimeZone;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
        
                #如果 $conf["showSecond"] 有設定
                if(isset($conf["showSecond"])){

                        #如果 $conf["showSecond" 爲 true
                        if($conf["showSecond"]=="true"){

                                #取得包含秒數的時間
                                $result["content"]=date("Y年m月d日H時i分s秒");
                                
                                #如果取得失敗
                                if($result["content"]==FALSE){
                                        
                                        #設置錯誤識別
                                        $result["status"]="false";
                                        
                                        #設置錯誤訊息
                                        $result["error"][]="取得時間失敗";
                                        
                                        #回傳結果
                                        return $result;
                                        
                                        }#if end
                                
                                }#if end

                        }#if end
                        
                #反之
                else{
                
                        #取得不包含秒數的時間
                        $result["content"]=date("Y年m月d日H時i分");
                        
                        #如果取得失敗
                        if($result["content"]==FALSE){
                                
                                #設置錯誤識別
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"][]="取得時間失敗";
                                
                                #回傳結果
                                return $result;
                                
                                }#if end
                        
                        }#else end
                        
                #執行到這邊代表正確無誤      
                        
                #設置執行正常
                $result["status"]="true";
                
                #回傳結果
                return $result;
        
                }#function getFullDateAndTime end

        /*
        #函式說明:
        #回傳西元的年月日,年月日之間的間隔符號自己設定。
        #回傳結果:
        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
        #$reuslt["error"],執行不正常結束的錯訊息陣列.
        #$result["function"],當前執行的函式名稱.
        #$result["content"],西元的年月日,格式為 2010 $conf["format"] 07 $conf["format"] 24
        #必填參數:
        #$conf["format"],字串,爲年月日之間的間隔字元.
        $conf["format"]="";
        #$conf["timeZone"],字串,時區代號,可以設定的時區列表:http://www.php.net/manual/en/timezones.php ,ex:"Asia/Taipei".
        $conf["timeZone"]="Asia/Taipei";
        #可省略參數:
        #無.
        #參考資料:
        #無.
        #備註:
        #無.
        */      
        public static function getDateWithSymbol(&$conf){

                #初始化要回傳的結果
                $result=array();
                
                #設置當其函數名稱
                $result["function"]=__FUNCTION__;
                
                #如果 $conf 不為陣列
                if(gettype($conf)!="array"){
                        
                        #設置執行失敗
                        $result["status"]="false";
                        
                        #設置執行錯誤訊息
                        $result["error"][]="\$conf變數須為陣列形態";

                        #如果傳入的參數為 null
                        if($conf==null){
                                
                                #設置執行錯誤訊息
                                $result["error"][]="\$conf變數不得為null,請檢查函數「".$result["function"]."」的參數設置有無正確!";
                                
                                }#if end

                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #檢查參數
                #函式說明:
                #檢查必填與可省略的參數,可省略參數可指定預設要給與什麼數值內容。
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$reuslt["error"],執行不正常結束的錯訊息陣列.
                #$result["function"],當前執行的函式名稱.
                #$result["passed"],識別要檢查的全體變數是否存在以及型態是否正確的變數,"true"代表檢查全部通過;"false"代表檢查不通過
                #$result[$shouldBtCheckedVarName]["varExist"],所檢查的變數是否存在,"false"代表不存在;"true"代表存在
                #$result[$shouldBtCheckedVarName]["varType"],所檢查的變數型態是否正確,"false"代表錯誤;"true"代表正確
                #$result[$shouldBtCheckedVarName]["error"],每個參數設定的錯誤訊息
                #$result["argu"],字串陣列,目前輸入的參數名稱陣列.
                #$result["legalVarName"],字串陣列,合法可用的參數名稱陣列.
                #$result["notNeedVar"],字串陣列,多餘的參數名稱.
                #必填寫的參數:
                #$conf["varInput"],陣列變數,要檢查的陣列變數,請在要檢查的參數前面加上&,這樣變動的結果才能被套用。
                $conf["variableCheck::checkArguments"]["varInput"]=&$conf;
                #$conf["mustBeFilledVariableName"],爲必填參數的變數名稱陣列,形態爲陣列變數,例如: $conf["mustBeFilledVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableName"]=array("timeZone","format");
                #$conf["mustBeFilledVariableType"],爲必填參數的變數陣列應該爲何種變數形態,形態爲陣列 例如: $conf["mustBeFilledVariableType"] = array("string",integer,"double"); 
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableType"]=array("string","string");
                #$conf["referenceVarKey"],字串,$conf參數後面的key值,用於移除不要的參考陣列.
                $conf["variableCheck::checkArguments"]["referenceVarKey"]="variableCheck::checkArguments";
                #可以省略的參數:
                #$conf["canBeEmptyString"],必填變數內容如果是空字串就不能算是有設置的話,請設為"false",預設爲"true"。
                $conf["variableCheck::checkArguments"]["canBeEmptyString"]="false";
                #$conf["skipableVariableName"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["skipableVariableName"]=array("showSecond");
                #$conf["skipableVariableType"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableType"] = array("string",integer,"double"); 
                $conf["variableCheck::checkArguments"]["skipableVariableType"]=array("string");
                #$conf["skipableVarDefaultValue"],字串陣列,每個不存在的可省略變數要初始化為什麼,null與代表不指定,若預設值是必填參數之一,請將$conf["mustBeFilledVar"]改成"\$conf["\mustBeFilledVar\"]".
                $conf["variableCheck::checkArguments"]["skipableVarDefaultValue"]=array("true");
                #$conf["arrayCountEqualCheck"],字串陣列,為檢查哪些陣列參數的元素數量要一樣,$conf["arrayCountEqualCheck"][$i]=array()為第$i組key為哪些的變數其元素數量要相等.
                #$conf["arrayCountEqualCheck"][]=array();
                #參考資料來源:
                #array_keys=>http://php.net/manual/en/function.array-keys.php
                $checkResult=variableCheck::checkArguments($conf["variableCheck::checkArguments"]);
                unset($conf["variableCheck::checkArguments"]);
                                        
                #如果檢查失敗
                if($checkResult["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                        
                #如果檢查不通過
                if($checkResult["passed"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #設定時區
                $conf_setTimeZone["timeZone"]=$conf["timeZone"];
                $setTimeZone=time::setTimeZone($conf_setTimeZone);
                unset($conf_setTimeZone);
                
                #如果設置時區失敗
                if($setTimeZone["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$setTimeZone;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end

                #取得格式時間
                $result["content"]=date("Y".$conf["format"]."m".$conf["format"]."d");

                #設置執行正常
                $result["status"]="true";
                
                #回傳結果
                return $result;

                }#function getDateWithSymbol end

        /*
        #函式說明:
        #印出 民國的年月日 例如 100年4月21日
        #回傳結果:
        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
        #$reuslt["error"],執行不正常結束的錯訊息陣列.
        #$result["function"],當前執行的函式名稱.
        #$result["content"],民國的年月日,格式為100年4月21日.
        #必填參數:
        #$conf["timeZone"],字串,時區代號,可以設定的時區列表:http://www.php.net/manual/en/timezones.php ,"Asia/Taipei".   
        $conf["timeZone"]="Asia/Taipei";
        #可省略參數:
        #無.
        #參考資料:
        #無.
        #備註:
        #無.
        */
        public static function getChtDate(&$conf){

                #初始化要回傳的結果
                $result=array();
                
                #設置當其函數名稱
                $result["function"]=__FUNCTION__;
                
                #如果 $conf 不為陣列
                if(gettype($conf)!="array"){
                        
                        #設置執行失敗
                        $result["status"]="false";
                        
                        #設置執行錯誤訊息
                        $result["error"][]="\$conf變數須為陣列形態";

                        #如果傳入的參數為 null
                        if($conf==null){
                                
                                #設置執行錯誤訊息
                                $result["error"][]="\$conf變數不得為null,請檢查函數「".$result["function"]."」的參數設置有無正確!";
                                
                                }#if end

                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #檢查參數
                #函式說明:
                #檢查必填與可省略的參數,可省略參數可指定預設要給與什麼數值內容。
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$reuslt["error"],執行不正常結束的錯訊息陣列.
                #$result["function"],當前執行的函式名稱.
                #$result["passed"],識別要檢查的全體變數是否存在以及型態是否正確的變數,"true"代表檢查全部通過;"false"代表檢查不通過
                #$result[$shouldBtCheckedVarName]["varExist"],所檢查的變數是否存在,"false"代表不存在;"true"代表存在
                #$result[$shouldBtCheckedVarName]["varType"],所檢查的變數型態是否正確,"false"代表錯誤;"true"代表正確
                #$result[$shouldBtCheckedVarName]["error"],每個參數設定的錯誤訊息
                #$result["argu"],字串陣列,目前輸入的參數名稱陣列.
                #$result["legalVarName"],字串陣列,合法可用的參數名稱陣列.
                #$result["notNeedVar"],字串陣列,多餘的參數名稱.
                #必填寫的參數:
                #$conf["varInput"],陣列變數,要檢查的陣列變數,請在要檢查的參數前面加上&,這樣變動的結果才能被套用。
                $conf["variableCheck::checkArguments"]["varInput"]=&$conf;
                #$conf["mustBeFilledVariableName"],爲必填參數的變數名稱陣列,形態爲陣列變數,例如: $conf["mustBeFilledVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableName"]=array("timeZone");
                #$conf["mustBeFilledVariableType"],爲必填參數的變數陣列應該爲何種變數形態,形態爲陣列 例如: $conf["mustBeFilledVariableType"] = array("string",integer,"double"); 
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableType"]=array("string");
                #$conf["referenceVarKey"],字串,$conf參數後面的key值,用於移除不要的參考陣列.
                $conf["variableCheck::checkArguments"]["referenceVarKey"]="variableCheck::checkArguments";
                #可以省略的參數:
                #$conf["canBeEmptyString"],必填變數內容如果是空字串就不能算是有設置的話,請設為"false",預設爲"true"。
                #$conf["variableCheck::checkArguments"]["canBeEmptyString"]="false";
                #$conf["skipableVariableName"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableName"] = array("id","account","password");
                #$conf["variableCheck::checkArguments"]["skipableVariableName"]=array("showSecond");
                #$conf["skipableVariableType"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableType"] = array("string",integer,"double"); 
                #$conf["variableCheck::checkArguments"]["skipableVariableType"]=array("string");
                #$conf["skipableVarDefaultValue"],字串陣列,每個不存在的可省略變數要初始化為什麼,null與代表不指定,若預設值是必填參數之一,請將$conf["mustBeFilledVar"]改成"\$conf["\mustBeFilledVar\"]".
                #$conf["variableCheck::checkArguments"]["skipableVarDefaultValue"]=array("true");
                #$conf["arrayCountEqualCheck"],字串陣列,為檢查哪些陣列參數的元素數量要一樣,$conf["arrayCountEqualCheck"][$i]=array()為第$i組key為哪些的變數其元素數量要相等.
                #$conf["arrayCountEqualCheck"][]=array();
                #參考資料來源:
                #array_keys=>http://php.net/manual/en/function.array-keys.php
                $checkResult=variableCheck::checkArguments($conf["variableCheck::checkArguments"]);
                unset($conf["variableCheck::checkArguments"]);
                                        
                #如果檢查失敗
                if($checkResult["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                        
                #如果檢查不通過
                if($checkResult["passed"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #設定時區
                $conf_setTimeZone["timeZone"]=$conf["timeZone"];
                $setTimeZone=time::setTimeZone($conf_setTimeZone);
                unset($conf_setTimeZone);
                
                #如果設置時區失敗
                if($setTimeZone["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$setTimeZone;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                        
                #取得民國年
                $year = date("Y")-1911;

                #回傳民國的日期
                $result["content"]=$year.date("年m月d日");
                
                #設置執行正常
                $result["status"]="true";
                
                #回傳結果
                return $result;
                
                }#function getChtDate end

        /*
        #函式說明:
        #回傳 西元的年月日 例如 2010年4月21日
        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
        #$reuslt["error"],執行不正常結束的錯訊息陣列.
        #$result["function"],當前執行的函式名稱.
        #$result["content"],民國的年月日,格式為100年4月21日.
        #必填參數:
        #$conf["timeZone"],字串,時區代號,可以設定的時區列表:http://www.php.net/manual/en/timezones.php, ex:"Asia/Taipei".
        $conf["timeZone"]="Asia/Taipei";
        #可省略參數:
        #無.
        #參考資料:
        #無.
        #備註:
        #無.
        */
        public static function getWestDate(&$conf){

                #初始化要回傳的結果
                $result=array();
                
                #設置當其函數名稱
                $result["function"]=__FUNCTION__;
                
                #如果 $conf 不為陣列
                if(gettype($conf)!="array"){
                        
                        #設置執行失敗
                        $result["status"]="false";
                        
                        #設置執行錯誤訊息
                        $result["error"][]="\$conf變數須為陣列形態";

                        #如果傳入的參數為 null
                        if($conf==null){
                                
                                #設置執行錯誤訊息
                                $result["error"][]="\$conf變數不得為null,請檢查函數「".$result["function"]."」的參數設置有無正確!";
                                
                                }#if end

                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #檢查參數
                #函式說明:
                #檢查必填與可省略的參數,可省略參數可指定預設要給與什麼數值內容。
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$reuslt["error"],執行不正常結束的錯訊息陣列.
                #$result["function"],當前執行的函式名稱.
                #$result["passed"],識別要檢查的全體變數是否存在以及型態是否正確的變數,"true"代表檢查全部通過;"false"代表檢查不通過
                #$result[$shouldBtCheckedVarName]["varExist"],所檢查的變數是否存在,"false"代表不存在;"true"代表存在
                #$result[$shouldBtCheckedVarName]["varType"],所檢查的變數型態是否正確,"false"代表錯誤;"true"代表正確
                #$result[$shouldBtCheckedVarName]["error"],每個參數設定的錯誤訊息
                #$result["argu"],字串陣列,目前輸入的參數名稱陣列.
                #$result["legalVarName"],字串陣列,合法可用的參數名稱陣列.
                #$result["notNeedVar"],字串陣列,多餘的參數名稱.
                #必填寫的參數:
                #$conf["varInput"],陣列變數,要檢查的陣列變數,請在要檢查的參數前面加上&,這樣變動的結果才能被套用。
                $conf["variableCheck::checkArguments"]["varInput"]=&$conf;
                #$conf["mustBeFilledVariableName"],爲必填參數的變數名稱陣列,形態爲陣列變數,例如: $conf["mustBeFilledVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableName"]=array("timeZone");
                #$conf["mustBeFilledVariableType"],爲必填參數的變數陣列應該爲何種變數形態,形態爲陣列 例如: $conf["mustBeFilledVariableType"] = array("string",integer,"double"); 
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableType"]=array("string");
                #$conf["referenceVarKey"],字串,$conf參數後面的key值,用於移除不要的參考陣列.
                $conf["variableCheck::checkArguments"]["referenceVarKey"]="variableCheck::checkArguments";
                #可以省略的參數:
                #$conf["canBeEmptyString"],必填變數內容如果是空字串就不能算是有設置的話,請設為"false",預設爲"true"。
                #$conf["variableCheck::checkArguments"]["canBeEmptyString"]="false";
                #$conf["skipableVariableName"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableName"] = array("id","account","password");
                #$conf["variableCheck::checkArguments"]["skipableVariableName"]=array("showSecond");
                #$conf["skipableVariableType"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableType"] = array("string",integer,"double"); 
                #$conf["variableCheck::checkArguments"]["skipableVariableType"]=array("string");
                #$conf["skipableVarDefaultValue"],字串陣列,每個不存在的可省略變數要初始化為什麼,null與代表不指定,若預設值是必填參數之一,請將$conf["mustBeFilledVar"]改成"\$conf["\mustBeFilledVar\"]".
                #$conf["variableCheck::checkArguments"]["skipableVarDefaultValue"]=array("true");
                #$conf["arrayCountEqualCheck"],字串陣列,為檢查哪些陣列參數的元素數量要一樣,$conf["arrayCountEqualCheck"][$i]=array()為第$i組key為哪些的變數其元素數量要相等.
                #$conf["arrayCountEqualCheck"][]=array();
                #參考資料來源:
                #array_keys=>http://php.net/manual/en/function.array-keys.php
                $checkResult=variableCheck::checkArguments($conf["variableCheck::checkArguments"]);
                unset($conf["variableCheck::checkArguments"]);
                                        
                #如果檢查失敗
                if($checkResult["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                        
                #如果檢查不通過
                if($checkResult["passed"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end

                #設定時區
                $conf_setTimeZone["timeZone"]=$conf["timeZone"];
                $setTimeZone=time::setTimeZone($conf_setTimeZone);
                unset($conf_setTimeZone);
                
                #如果設置時區失敗
                if($setTimeZone["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$setTimeZone;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end

                #取得西元時間
                $result["content"]=date("Y年m月d日");
                
                #設置執行正常
                $result["status"]="true";
                
                #回傳結果
                return $result;

                }#function getWestDate end

        /*
        #函式說明:
        #判斷當下是否在某段時間之前、後、之內、之外.
        #回傳結果:
        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
        #$reuslt["error"],執行不正常結束的錯訊息陣列.
        #$result["function"],當前執行的函式名稱.
        #$result["argu"],使用的參數.
        #$result["passed"],若沒有符合條件則回傳"true";反之為"false".
        #必填參數:
        #$conf["deadline"],字串,爲條件的截止參考時間點,格式須爲 2011-05-27 23:59:59
        $conf["deadline"]="";
        #$conf["condition"],字串,爲轉址條件,可以用的值有:"before",代表在某段時間之前;"after",代表在某段時間之後;"betweenStartToDeadline",代表在某段時間之內;"besideStartToDeadline",代表在某段時間之外.
        $conf["condition"]="";
        #可省略參數:       
        #$conf["startTime"],字串,爲條件的開始的參考時間點,格式須爲 2011-05-27 23:59:59 ,適用於 $conf["condtion"] 爲 "betweenStartToDeadline" 或 "besideStartToDeadline".
        #$conf["startTime"]="";
        #$conf["timeZone"],字串,當前時區為何?預設為"Asia/Taipei",可以設定的時區列表:http://www.php.net/manual/en/timezones.php
        #$conf["timeZone"]="Asia/Taipei";
        #參考資料:
        #無.
        #備註:
        #無.
        */
        public static function deadline(&$conf){
        
                #初始化要回傳的結果
                $result=array();
                
                #設置當其函數名稱
                $result["function"]=__FUNCTION__;
                
                #如果 $conf 不為陣列
                if(gettype($conf)!="array"){
                        
                        #設置執行失敗
                        $result["status"]="false";
                        
                        #設置執行錯誤訊息
                        $result["error"][]="\$conf變數須為陣列形態";

                        #如果傳入的參數為 null
                        if($conf==null){
                                
                                #設置執行錯誤訊息
                                $result["error"][]="\$conf變數不得為null,請檢查函數「".$result["function"]."」的參數設置有無正確!";
                                
                                }#if end

                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #儲存使用的參數
                $result["argu"]=$conf;
                
                #檢查參數
                #函式說明:
                #檢查必填與可省略的參數,可省略參數可指定預設要給與什麼數值內容。
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$reuslt["error"],執行不正常結束的錯訊息陣列.
                #$result["function"],當前執行的函式名稱.
                #$result["passed"],識別要檢查的全體變數是否存在以及型態是否正確的變數,"true"代表檢查全部通過;"false"代表檢查不通過
                #$result[$shouldBtCheckedVarName]["varExist"],所檢查的變數是否存在,"false"代表不存在;"true"代表存在
                #$result[$shouldBtCheckedVarName]["varType"],所檢查的變數型態是否正確,"false"代表錯誤;"true"代表正確
                #$result[$shouldBtCheckedVarName]["error"],每個參數設定的錯誤訊息
                #$result["argu"],字串陣列,目前輸入的參數名稱陣列.
                #$result["legalVarName"],字串陣列,合法可用的參數名稱陣列.
                #$result["notNeedVar"],字串陣列,多餘的參數名稱.
                #必填寫的參數:
                #$conf["varInput"],陣列變數,要檢查的陣列變數,請在要檢查的參數前面加上&,這樣變動的結果才能被套用。
                $conf["variableCheck::checkArguments"]["varInput"]=&$conf;
                #$conf["mustBeFilledVariableName"],爲必填參數的變數名稱陣列,形態爲陣列變數,例如: $conf["mustBeFilledVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableName"]=array("deadline","condition");
                #$conf["mustBeFilledVariableType"],爲必填參數的變數陣列應該爲何種變數形態,形態爲陣列 例如: $conf["mustBeFilledVariableType"] = array("string",integer,"double"); 
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableType"]=array("string","string");
                #$conf["referenceVarKey"],字串,$conf參數後面的key值,用於移除不要的參考陣列.
                $conf["variableCheck::checkArguments"]["referenceVarKey"]="variableCheck::checkArguments";
                #可以省略的參數:
                #$conf["skipableVariableCanNotBeEmpty"],字串陣列,哪些可省略參數不可以為空字串或集合.
                $conf["variableCheck::checkArguments"]["skipableVariableCanNotBeEmpty"]=array("startTime","timeZone");
                #$conf["canBeEmptyString"],必填變數內容如果是空字串就不能算是有設置的話,請設為"false",預設爲"true"。
                $conf["variableCheck::checkArguments"]["canBeEmptyString"]="false";
                #$conf["skipableVariableName"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["skipableVariableName"]=array("startTime","timeZone");
                #$conf["skipableVariableType"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableType"] = array("string",integer,"double"); 
                $conf["variableCheck::checkArguments"]["skipableVariableType"]=array("string","string");
                #$conf["skipableVarDefaultValue"],字串陣列,每個不存在的可省略變數要初始化為什麼,null與代表不指定,若預設值是必填參數之一,請將$conf["mustBeFilledVar"]改成"\$conf["\mustBeFilledVar\"]".
                $conf["variableCheck::checkArguments"]["skipableVarDefaultValue"]=array(null,"Asia/Taipei");
                #$conf["arrayCountEqualCheck"],字串陣列,為檢查哪些陣列參數的元素數量要一樣,$conf["arrayCountEqualCheck"][$i]=array()為第$i組key為哪些的變數其元素數量要相等.
                #$conf["arrayCountEqualCheck"][]=array();
                #參考資料來源:
                #array_keys=>http://php.net/manual/en/function.array-keys.php
                $checkResult=variableCheck::checkArguments($conf["variableCheck::checkArguments"]);
                unset($conf["variableCheck::checkArguments"]);
                                        
                #如果檢查失敗
                if($checkResult["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                        
                #如果檢查不通過
                if($checkResult["passed"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end

                #設定時區
                $conf_setTimeZone["timeZone"]=$conf["timeZone"];
                $setTimeZone=time::setTimeZone($conf_setTimeZone);
                unset($conf_setTimeZone);
                
                #如果設置時區失敗
                if($setTimeZone["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$setTimeZone;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end

                #如果 $conf["startTime"] 有設置
                if(isset($conf["startTime"])){
                        
                        #取得時間範圍的起始點
                        $startTime=strtotime(date($conf["startTime"]));
                        
                        #如果 $startTime 大於等於 $conf["deadline"]
                        if($startTime >= strtotime(date($conf["deadline"]))){
                                
                                #設置錯誤訊息
                                $result["error"][]="startTime參數 不能大於等於 deadline參數";
                                
                                #設置執行不正常
                                $result["status"]="false";
                                
                                #回傳結果
                                return $result;
                                
                                }#if end                                
                        
                        }#if end

                #把目前時間放入變數$now
                $now=strtotime(date("Y-m-d H:i:s"));

                #截止日期
                $deadLine=strtotime(date($conf["deadline"]));
                
                #截止日期同時為時間範圍的終點
                $end=$deadLine;

                #如果條件是在某段時間之後
                if($conf["condition"]=="after"){

                        #如果現在的時間超過$deadLine
                        if($now >= $deadLine){

                                #執行到這邊代表是不符合條件時間內
                                $result["passed"]="false";
                                
                                #設置執行正常
                                $result["status"]="true";
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                        
                        #反之
                        else{
                                
                                #執行到這邊代表是符合條件時間內
                                $result["passed"]="true";
                                
                                #設置執行正常
                                $result["status"]="true";
                                
                                #回傳結果
                                return $result;
                                
                                }#else end
                                
                        }#function end

                #如果條件是在某段時間之前           
                else if($conf["condition"]=="before"){

                        #果現在的時間沒超過$deadLine
                        if($now <= $deadLine){

                                #執行到這邊代表是不符合條件時間內
                                $result["passed"]="false";
                                
                                #設置執行正常
                                $result["status"]="true";
                                
                                #回傳結果
                                return $result;

                                }#if end
                                
                        #反之
                        else{
                                
                                #執行到這邊代表是符合條件時間內
                                $result["passed"]="true";
                                
                                #設置執行正常
                                $result["status"]="true";
                                
                                #回傳結果
                                return $result;
                                
                                }#else end
                        
                        }#if end

                #如果條件是在某段時間之內   
                else if($conf["condition"]=="betweenStartToDeadline"){

                        #檢查參數是否都設定了
                        #函式說明:
                        #檢查陣列裡面的特定元素是否存在以及其變數型態是否正確,如果沒有設定則回傳提示訊息。
                        #回傳結果:
                        #$result["passed"],識別要檢查的全體變數是否存在以及型態是否正確的變數,"true"代表檢查全部通過;"false"代表檢查不通過
                        #$result[$shouldBtCheckedVarName]["varExist"],所檢查的變數是否存在,"false"代表不存在;"true"代表存在
                        #$result[$shouldBtCheckedVarName]["varType"],所檢查的變數型態是否正確,"false"代表錯誤;"true"代表正確
                        #必填寫的參數:
                        $conf["variableCheck"]["isexistMuti"]["varInput"]=$conf;#要檢查的陣列變數
                        $conf["variableCheck"]["isexistMuti"]["variableCheck"]=array("startTime");#要檢查的變數名稱陣列,形態爲陣列變數,例如: $conf["variableCheck"] = array("id","account","password");
                        #可以省略的參數:
                        #$conf["variableType"]=array();#要檢查的陣列變數內的元素應該爲何種變數形態,形態爲陣列 例如: $conf[variableType] = array("string","int","double"); 
                        $checkResult=variableCheck::isexistMulti($conf["variableCheck"]["isexistMuti"]);
                        unset($conf["variableCheck"]["isexistMuti"]);

                        #如果檢查失敗
                        if($checkResult["status"]=="false"){
                                
                                #設置行執行失敗
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$checkResult;
                        
                                #回傳結果
                                return $result;
                                
                                }#if end

                        #如果檢查不通過
                        if($checkResult["passed"]=="false"){
                        
                                #設置行執行失敗
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$checkResult;
                        
                                #回傳結果
                                return $result;
                                
                                }#if end
                                
                        #如果現在的時間是在條件時間內
                        if($now <= $end && $now >= $startTime){
                
                                #執行到這邊代表是不符合條件時間內
                                $result["passed"]="false";
                                
                                #設置執行正常
                                $result["status"]="true";
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                                
                        #反之
                        else{
                                
                                #執行到這邊代表是符合條件時間內
                                $result["passed"]="true";
                                
                                #設置執行正常
                                $result["status"]="true";
                                
                                #回傳結果
                                return $result;
                                
                                }#else end
                                
                        }#if end

                #如果條件是在某段時間之外   
                else if($conf["condition"]=="besideStartToDeadline"){

                        #檢查參數是否都設定了
                        #函式說明:
                        #檢查陣列裡面的特定元素是否存在以及其變數型態是否正確,如果沒有設定則回傳提示訊息。
                        #回傳結果:
                        #$result["passed"],識別要檢查的全體變數是否存在以及型態是否正確的變數,"true"代表檢查全部通過;"false"代表檢查不通過
                        #$result[$shouldBtCheckedVarName]["varExist"],所檢查的變數是否存在,"false"代表不存在;"true"代表存在
                        #$result[$shouldBtCheckedVarName]["varType"],所檢查的變數型態是否正確,"false"代表錯誤;"true"代表正確
                        #必填寫的參數:
                        $conf["variableCheck"]["isexistMuti"]["varInput"]=$conf;#要檢查的陣列變數
                        $conf["variableCheck"]["isexistMuti"]["variableCheck"]=array("startTime");#要檢查的變數名稱陣列,形態爲陣列變數,例如: $conf["variableCheck"] = array("id","account","password");
                        #可以省略的參數:
                        #$conf["variableType"]=array();#要檢查的陣列變數內的元素應該爲何種變數形態,形態爲陣列 例如: $conf[variableType] = array("string","int","double"); 
                        $checkResult=variableCheck::isexistMulti($conf["variableCheck"]["isexistMuti"]);
                        unset($conf["variableCheck"]["isexistMuti"]);

                        #如果檢查失敗
                        if($checkResult["status"]=="false"){
                                
                                #設置行執行失敗
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$checkResult;
                        
                                #回傳結果
                                return $result;
                                
                                }#if end

                        #如果檢查不通過
                        if($checkResult["passed"]=="false"){
                        
                                #設置行執行失敗
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$checkResult;
                        
                                #回傳結果
                                return $result;
                                
                                }#if end

                        #如果現在的時間是在條件時間外
                        if($now >= $end || $now <= $startTime){
                                
                                #執行到這邊代表是不符合條件時間內
                                $result["passed"]="false";
                                
                                #設置執行正常
                                $result["status"]="true";
                                
                                #回傳結果
                                return $result;

                                }#if end
                        
                        #反之
                        else{
                                
                                #執行到這邊代表是符合條件時間內
                                $result["passed"]="true";
                                
                                #設置執行正常
                                $result["status"]="true";
                                
                                #回傳結果
                                return $result;
                                
                                }#else end
                                
                        }#if end
                        
                #執行到這邊代表不正常
                $result["status"]="false";
                
                #設定錯誤訊息
                $result["error"][]="非預期的錯誤";
                
                #回傳結果
                return $result;
        
                }//function deadline end

        /*
        #函式說明:
        #在某段時間之前、後、之內、之外,轉址到某處,若沒有符合條件則回傳"passed"
        #回傳結果:
        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
        #$reuslt["error"],執行不正常結束的錯訊息陣列.
        #$result["function"],當前執行的函式名稱.
        #$result["argu"],使用的參數.
        #$result["content"],若沒有符合條件則回傳"passed".
        #必填參數:
        #$conf["deadline"],字串,爲條件的截止參考時間點,格式須爲 2011-05-27 23:59:59
        $conf["deadline"]="";
        #$conf["toWhere"],字串,爲要轉址到的地方.
        $conf["toWhere"]="";
        #$conf["condition"],字串,爲轉址條件,可以用的值有:"before",代表在某段時間之前;"after",代表在某段時間之後;"betweenStartToDeadline",代表在某段時間之內;"besideStartToDeadline",代表在某段時間之外.
        $conf["condition"]="";
        #可省略參數:       
        #$conf["startTime"],字串,爲條件的開始的參考時間點,格式須爲 2011-05-27 23:59:59 ,適用於 $conf["condtion"] 爲 "betweenStartToDeadline" 或 "besideStartToDeadline".
        #$conf["startTime"]="";
        #$conf["timeZone"],字串,當前時區為何?預設為"Asia/Taipei",可以設定的時區列表:http://www.php.net/manual/en/timezones.php
        #$conf["timeZone"]="Asia/Taipei";
        #參考資料:
        #無.
        #備註:
        #無.
        */
        public static function deadlineAction(&$conf){

                #初始化要回傳的結果
                $result=array();
                
                #設置當其函數名稱
                $result["function"]=__FUNCTION__;
                
                #如果 $conf 不為陣列
                if(gettype($conf)!="array"){
                        
                        #設置執行失敗
                        $result["status"]="false";
                        
                        #設置執行錯誤訊息
                        $result["error"][]="\$conf變數須為陣列形態";

                        #如果傳入的參數為 null
                        if($conf==null){
                                
                                #設置執行錯誤訊息
                                $result["error"][]="\$conf變數不得為null,請檢查函數「".$result["function"]."」的參數設置有無正確!";
                                
                                }#if end

                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #取得使用的參數.
                $result["argu"]=$conf;
                
                #檢查參數
                #函式說明:
                #檢查必填與可省略的參數,可省略參數可指定預設要給與什麼數值內容。
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$reuslt["error"],執行不正常結束的錯訊息陣列.
                #$result["function"],當前執行的函式名稱.
                #$result["passed"],識別要檢查的全體變數是否存在以及型態是否正確的變數,"true"代表檢查全部通過;"false"代表檢查不通過
                #$result[$shouldBtCheckedVarName]["varExist"],所檢查的變數是否存在,"false"代表不存在;"true"代表存在
                #$result[$shouldBtCheckedVarName]["varType"],所檢查的變數型態是否正確,"false"代表錯誤;"true"代表正確
                #$result[$shouldBtCheckedVarName]["error"],每個參數設定的錯誤訊息
                #$result["argu"],字串陣列,目前輸入的參數名稱陣列.
                #$result["legalVarName"],字串陣列,合法可用的參數名稱陣列.
                #$result["notNeedVar"],字串陣列,多餘的參數名稱.
                #必填寫的參數:
                #$conf["varInput"],陣列變數,要檢查的陣列變數,請在要檢查的參數前面加上&,這樣變動的結果才能被套用。
                $conf["variableCheck::checkArguments"]["varInput"]=&$conf;
                #$conf["mustBeFilledVariableName"],爲必填參數的變數名稱陣列,形態爲陣列變數,例如: $conf["mustBeFilledVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableName"]=array("deadline","toWhere","condition");
                #$conf["mustBeFilledVariableType"],爲必填參數的變數陣列應該爲何種變數形態,形態爲陣列 例如: $conf["mustBeFilledVariableType"] = array("string",integer,"double"); 
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableType"]=array("string","string","string");
                #$conf["referenceVarKey"],字串,$conf參數後面的key值,用於移除不要的參考陣列.
                $conf["variableCheck::checkArguments"]["referenceVarKey"]="variableCheck::checkArguments";
                #可以省略的參數:
                #$conf["skipableVariableCanNotBeEmpty"],字串陣列,哪些可省略參數不可以為空字串或集合.
                $conf["variableCheck::checkArguments"]["skipableVariableCanNotBeEmpty"]=array("startTime","timeZone");
                #$conf["canBeEmptyString"],必填變數內容如果是空字串就不能算是有設置的話,請設為"false",預設爲"true"。
                $conf["variableCheck::checkArguments"]["canBeEmptyString"]="false";
                #$conf["skipableVariableName"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["skipableVariableName"]=array("startTime","timeZone");
                #$conf["skipableVariableType"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableType"] = array("string",integer,"double"); 
                $conf["variableCheck::checkArguments"]["skipableVariableType"]=array("string","string");
                #$conf["skipableVarDefaultValue"],字串陣列,每個不存在的可省略變數要初始化為什麼,null與代表不指定,若預設值是必填參數之一,請將$conf["mustBeFilledVar"]改成"\$conf["\mustBeFilledVar\"]".
                $conf["variableCheck::checkArguments"]["skipableVarDefaultValue"]=array(null,"Asia/Taipei");
                #$conf["arrayCountEqualCheck"],字串陣列,為檢查哪些陣列參數的元素數量要一樣,$conf["arrayCountEqualCheck"][$i]=array()為第$i組key為哪些的變數其元素數量要相等.
                #$conf["arrayCountEqualCheck"][]=array();
                #參考資料來源:
                #array_keys=>http://php.net/manual/en/function.array-keys.php
                $checkResult=variableCheck::checkArguments($conf["variableCheck::checkArguments"]);
                unset($conf["variableCheck::checkArguments"]);
                                        
                #如果檢查失敗
                if($checkResult["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                        
                #如果檢查不通過
                if($checkResult["passed"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                        
                #函式說明:
                #判斷當下是否在某段時間之前、後、之內、之外.
                #回傳結果:
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$reuslt["error"],執行不正常結束的錯訊息陣列.
                #$result["function"],當前執行的函式名稱.
                #$result["passed"],若沒有符合條件則回傳"true";反之為"false".
                #必填參數:
                #$conf["deadline"],字串,爲條件的截止參考時間點,格式須爲 2011-05-27 23:59:59
                $conf["time::deadline"]["deadline"]=$conf["deadline"];
                #$conf["condition"],字串,爲轉址條件,可以用的值有:"before",代表在某段時間之前;"after",代表在某段時間之後;"betweenStartToDeadline",代表在某段時間之內;"besideStartToDeadline",代表在某段時間之外.
                $conf["time::deadline"]["condition"]=$conf["condition"];
                #可省略參數:       
                
                #若有指定 "startTime" 參數
                if(isset($conf["startTime"])){
                
                        #$conf["startTime"],字串,爲條件的開始的參考時間點,格式須爲 2011-05-27 23:59:59 ,適用於 $conf["condtion"] 爲 "betweenStartToDeadline" 或 "besideStartToDeadline".
                        $conf["time::deadline"]["startTime"]=$conf["startTime"];
                
                        }#if end
                
                #若有指定 "timeZone" 參數
                if(isset($conf["timeZone"])){
                
                        #$conf["startTime"],字串,爲條件的開始的參考時間點,格式須爲 2011-05-27 23:59:59 ,適用於 $conf["condtion"] 爲 "betweenStartToDeadline" 或 "besideStartToDeadline".
                        $conf["time::deadline"]["timeZone"]=$conf["timeZone"];
                
                        }#if end
        
                #參考資料:
                #無.
                #備註:
                #無.
                $deadline=time::deadline($conf["time::deadline"]);
                unset($conf["time::deadline"]);
                
                #如果執行失敗
                if($deadline["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$deadline;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end

                #如果不是在指定時間條件下
                if($deadline["passed"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="true";
                        
                        #設置通過, 不許進行轉址
                        $result["content"]="passed";
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                        
                #執行到這邊代表符合指定時間條件
                
                #進行轉址
                #函式說明:
                #設定session變數後,立即轉址.
                #回傳的結果:
                #$result["status"],執行是否成功,"true"代表成功,"false"代表不成功.
                #$result["function"],當前執行的函數名稱.
                #$result["error"],錯誤訊息陣列.
                #必填參數:
                #$conf["headerLocation"],為要轉址到的地方,若爲 $_SERVER["PHP_SELF"],則爲回到目前頁面,全民資安素養網爲 https://isafe.moe.edu.tw/.
                $conf["header::redirectionNow"]["headerLocation"]=$conf["toWhere"];
                #可省略參數:
                #$conf["sessionName"],字串陣列,可以指派session變數的名稱.
                #$conf["sessionName"]=array("");
                #$conf["sessionValue"]字串陣列,可以指派session變數的內容.
                #$conf["sessionValue"]=array("");
                #參考資料:
                #http://php.net/manual/en/reserved.variables.server.php
                #備註:
                #無.
                $redirectionNow=header::redirectionNow($conf["header::redirectionNow"]);
                unset($conf["header::redirectionNow"]);
                
                #如果執行失敗
                if($redirectionNow["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$redirectionNow;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                        
                #不應該執行到這邊
                
                #設置執行失敗
                $result["status"]="false";

                #設置不明錯誤原因
                $result["error"]="unknown error";
                
                #回傳結果
                return $result;

                }#function deadlineAction end

        /*
        #函式說明:
        #將時間轉換成用分鐘表示,適用於格式字串「3H5M15S」或「3H5M15」轉換成「185.25」的類型,結果會回傳分鐘數.
        #回傳結果:
        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
        #$reuslt["error"],執行不正常結束的錯訊息陣列.
        #$result["function"],當前執行的函式名稱.
        #$result["content"],轉換好的結果.
        #必填參數:
        #$conf["stringIn"],字串,爲要分割的字串.
        $conf["stringIn"]="";
        #$conf["hourSpiltSymbol"],字串,爲小時的單位代稱.
        $conf["hourSpiltSymbol"]="";
        #$conf["minSpiltSymbol"],字串,爲分鐘的單位代稱.
        $conf["minSpiltSymbol"]="";
        #$conf["secSpiltSymbol"],字串,爲秒的單位代稱.
        $conf["secSpiltSymbol"]="";
        #可省略參數:
        #無.
        #參考資料:
        #無.
        #備註:
        #無.
        */      
        public static function timeToMin(&$conf){

                #初始化要回傳的結果
                $result=array();
                
                #設置當其函數名稱
                $result["function"]=__FUNCTION__;
                
                #如果 $conf 不為陣列
                if(gettype($conf)!="array"){
                        
                        #設置執行失敗
                        $result["status"]="false";
                        
                        #設置執行錯誤訊息
                        $result["error"][]="\$conf變數須為陣列形態";

                        #如果傳入的參數為 null
                        if($conf==null){
                                
                                #設置執行錯誤訊息
                                $result["error"][]="\$conf變數不得為null,請檢查函數「".$result["function"]."」的參數設置有無正確!";
                                
                                }#if end

                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #檢查參數
                #函式說明:
                #檢查必填與可省略的參數,可省略參數可指定預設要給與什麼數值內容。
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$reuslt["error"],執行不正常結束的錯訊息陣列.
                #$result["function"],當前執行的函式名稱.
                #$result["passed"],識別要檢查的全體變數是否存在以及型態是否正確的變數,"true"代表檢查全部通過;"false"代表檢查不通過
                #$result[$shouldBtCheckedVarName]["varExist"],所檢查的變數是否存在,"false"代表不存在;"true"代表存在
                #$result[$shouldBtCheckedVarName]["varType"],所檢查的變數型態是否正確,"false"代表錯誤;"true"代表正確
                #$result[$shouldBtCheckedVarName]["error"],每個參數設定的錯誤訊息
                #$result["argu"],字串陣列,目前輸入的參數名稱陣列.
                #$result["legalVarName"],字串陣列,合法可用的參數名稱陣列.
                #$result["notNeedVar"],字串陣列,多餘的參數名稱.
                #必填寫的參數:
                #$conf["varInput"],陣列變數,要檢查的陣列變數,請在要檢查的參數前面加上&,這樣變動的結果才能被套用。
                $conf["variableCheck::checkArguments"]["varInput"]=&$conf;
                #$conf["mustBeFilledVariableName"],爲必填參數的變數名稱陣列,形態爲陣列變數,例如: $conf["mustBeFilledVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableName"]=array("stringIn","hourSpiltSymbol","minSpiltSymbol","secSpiltSymbol");
                #$conf["mustBeFilledVariableType"],爲必填參數的變數陣列應該爲何種變數形態,形態爲陣列 例如: $conf["mustBeFilledVariableType"] = array("string",integer,"double"); 
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableType"]=array("string","string","string","string");
                #$conf["referenceVarKey"],字串,$conf參數後面的key值,用於移除不要的參考陣列.
                $conf["variableCheck::checkArguments"]["referenceVarKey"]="variableCheck::checkArguments";
                #可以省略的參數:
                #$conf["skipableVariableCanNotBeEmpty"],字串陣列,哪些可省略參數不可以為空字串或集合.
                #$conf["variableCheck::checkArguments"]["skipableVariableCanNotBeEmpty"]=array("startTime","timeZone");
                #$conf["canBeEmptyString"],必填變數內容如果是空字串就不能算是有設置的話,請設為"false",預設爲"true"。
                #$conf["variableCheck::checkArguments"]["canBeEmptyString"]="false";
                #$conf["skipableVariableName"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableName"] = array("id","account","password");
                #$conf["variableCheck::checkArguments"]["skipableVariableName"]=array("startTime","timeZone");
                #$conf["skipableVariableType"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableType"] = array("string",integer,"double"); 
                #$conf["variableCheck::checkArguments"]["skipableVariableType"]=array("string","string");
                #$conf["skipableVarDefaultValue"],字串陣列,每個不存在的可省略變數要初始化為什麼,null與代表不指定,若預設值是必填參數之一,請將$conf["mustBeFilledVar"]改成"\$conf["\mustBeFilledVar\"]".
                #$conf["variableCheck::checkArguments"]["skipableVarDefaultValue"]=array(null,"Asia/Taipei");
                #$conf["arrayCountEqualCheck"],字串陣列,為檢查哪些陣列參數的元素數量要一樣,$conf["arrayCountEqualCheck"][$i]=array()為第$i組key為哪些的變數其元素數量要相等.
                #$conf["arrayCountEqualCheck"][]=array();
                #參考資料來源:
                #array_keys=>http://php.net/manual/en/function.array-keys.php
                $checkResult=variableCheck::checkArguments($conf["variableCheck::checkArguments"]);
                unset($conf["variableCheck::checkArguments"]);
                                        
                #如果檢查失敗
                if($checkResult["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                        
                #如果檢查不通過
                if($checkResult["passed"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end

                #以 $conf["hourSpiltSymbol"] 爲分割點進行字串分割
                $spiltString_conf["stringIn"]=$conf["stringIn"];
                $spiltString_conf["spiltSymbol"]=$conf["hourSpiltSymbol"];
                $spiltString=stringProcess::spiltString($spiltString_conf);
                unset($spiltString_conf);#清空變數避免出錯

                #如果分割失敗
                if($spiltString["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$spiltString;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                        
                #如果分割好的筆數小於2
                if($spiltString["dataCounts"]<2){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$spiltString;
                        
                        #增加錯誤訊息
                        $result["error"][]="請確認 stringIn 參數是否符合格式";
                        
                        #回傳結果
                        return $result;
                        
                        }#if end

                #將取得的小時放進 $hour 裏面
                $hour=$spiltString["dataArray"][0];

                #以 $conf["minSpiltSymbol"] 爲分割點進行字串分割
                $spiltString_conf["stringIn"]=$conf["stringIn"];
                $spiltString_conf["spiltSymbol"]=$conf["minSpiltSymbol"];
                $spiltString=stringProcess::spiltString($spiltString_conf);
                unset($spiltString_conf);#清空變數避免出錯
                
                #如果分割失敗
                if($spiltString["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$spiltString;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                        
                #如果分割好的筆數小於2
                if($spiltString["dataCounts"]<2){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$spiltString;
                        
                        #增加錯誤訊息
                        $result["error"][]="請確認 stringIn 參數是否符合格式";
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #以 $conf["minSpiltSymbol"] 爲分割點進行字串分割
                $spiltString_conf["stringIn"]=$spiltString["dataArray"][0];
                $spiltString_conf["spiltSymbol"]=$conf["hourSpiltSymbol"];
                $spiltString=stringProcess::spiltString($spiltString_conf);
                unset($spiltString_conf);#清空變數避免出錯
        
                #如果分割失敗
                if($spiltString["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$spiltString;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                        
                #如果分割好的筆數小於2
                if($spiltString["dataCounts"]<2){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$spiltString;
                        
                        #增加錯誤訊息
                        $result["error"][]="請確認 stringIn 參數是否符合格式";
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #將取得的分鐘放進 $min 裏面
                $min=$spiltString["dataArray"][1];
                
                #以 $conf["secSpiltSymbol"] 爲分割點進行字串分割
                $spiltString_conf["stringIn"]=$conf["stringIn"];
                $spiltString_conf["spiltSymbol"]=$conf["secSpiltSymbol"];
                $spiltString=stringProcess::spiltString($spiltString_conf);
                unset($spiltString_conf);#清空變數避免出錯

                #如果分割失敗
                if($spiltString["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$spiltString;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end

                #如果分割好的筆數為0
                if($spiltString["dataCounts"]==0){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$spiltString;
                        
                        #增加錯誤訊息
                        $result["error"][]="請確認 stringIn 參數是否符合格式";
                        
                        #回傳結果
                        return $result;
                        
                        }#if end

                #以 $conf["minSpiltSymbol"] 爲分割點進行字串分割
                $spiltString_conf["stringIn"]=$spiltString["dataArray"][0];
                $spiltString_conf["spiltSymbol"]=$conf["minSpiltSymbol"];
                $spiltString=stringProcess::spiltString($spiltString_conf);
                unset($spiltString_conf);#清空變數避免出錯

                #如果分割失敗
                if($spiltString["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$spiltString;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                        
                #如果分割好的筆數小於2
                if($spiltString["dataCounts"]<2){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$spiltString;
                        
                        #增加錯誤訊息
                        $result["error"][]="請確認 stringIn 參數是否符合格式";
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #將取得的秒數放進 $sec 裏面
                $sec=$spiltString["dataArray"][1];

                #將小時、秒換算成分鐘加總,小數取到兩位
                $result["content"]=$hour*60+$min+round($sec/60,2);

                #設置執行正常
                $result["status"]="true";

                #回傳結果
                return $result; 
        
                }#function timeToMin end
        
        /*
        #函式說明:
        #求算上個月份是幾月
        #回傳結果:
        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
        #$reuslt["error"],執行不正常結束的錯訊息陣列.
        #$result["function"],當前執行的函式名稱.
        #$result["lastMonth"],上個月份
        #$result["yearChanged"],若爲true則代表年度要減1,若爲false則年度不變。
        #必填參數:
        #$conf["thisMonth"],整數,當前的月份.
        $conf["thisMonth"]=;
        #可省略參數:
        #無.
        #參考資料:
        #無.
        #備註:
        #無.
        */
        public static function getLastMonth(&$conf){

                #初始化要回傳的結果
                $result=array();
                
                #設置當其函數名稱
                $result["function"]=__FUNCTION__;
                
                #如果 $conf 不為陣列
                if(gettype($conf)!="array"){
                        
                        #設置執行失敗
                        $result["status"]="false";
                        
                        #設置執行錯誤訊息
                        $result["error"][]="\$conf變數須為陣列形態";

                        #如果傳入的參數為 null
                        if($conf==null){
                                
                                #設置執行錯誤訊息
                                $result["error"][]="\$conf變數不得為null,請檢查函數「".$result["function"]."」的參數設置有無正確!";
                                
                                }#if end

                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #檢查參數
                #函式說明:
                #檢查必填與可省略的參數,可省略參數可指定預設要給與什麼數值內容。
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$reuslt["error"],執行不正常結束的錯訊息陣列.
                #$result["function"],當前執行的函式名稱.
                #$result["passed"],識別要檢查的全體變數是否存在以及型態是否正確的變數,"true"代表檢查全部通過;"false"代表檢查不通過
                #$result[$shouldBtCheckedVarName]["varExist"],所檢查的變數是否存在,"false"代表不存在;"true"代表存在
                #$result[$shouldBtCheckedVarName]["varType"],所檢查的變數型態是否正確,"false"代表錯誤;"true"代表正確
                #$result[$shouldBtCheckedVarName]["error"],每個參數設定的錯誤訊息
                #$result["argu"],字串陣列,目前輸入的參數名稱陣列.
                #$result["legalVarName"],字串陣列,合法可用的參數名稱陣列.
                #$result["notNeedVar"],字串陣列,多餘的參數名稱.
                #必填寫的參數:
                #$conf["varInput"],陣列變數,要檢查的陣列變數,請在要檢查的參數前面加上&,這樣變動的結果才能被套用。
                $conf["variableCheck::checkArguments"]["varInput"]=&$conf;
                #$conf["mustBeFilledVariableName"],爲必填參數的變數名稱陣列,形態爲陣列變數,例如: $conf["mustBeFilledVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableName"]=array("thisMonth");
                #$conf["mustBeFilledVariableType"],爲必填參數的變數陣列應該爲何種變數形態,形態爲陣列 例如: $conf["mustBeFilledVariableType"] = array("string",integer,"double"); 
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableType"]=array("integer");
                #$conf["referenceVarKey"],字串,$conf參數後面的key值,用於移除不要的參考陣列.
                $conf["variableCheck::checkArguments"]["referenceVarKey"]="variableCheck::checkArguments";
                #可以省略的參數:
                #$conf["skipableVariableCanNotBeEmpty"],字串陣列,哪些可省略參數不可以為空字串或集合.
                #$conf["variableCheck::checkArguments"]["skipableVariableCanNotBeEmpty"]=array("startTime","timeZone");
                #$conf["canBeEmptyString"],必填變數內容如果是空字串就不能算是有設置的話,請設為"false",預設爲"true"。
                #$conf["variableCheck::checkArguments"]["canBeEmptyString"]="false";
                #$conf["skipableVariableName"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableName"] = array("id","account","password");
                #$conf["variableCheck::checkArguments"]["skipableVariableName"]=array("startTime","timeZone");
                #$conf["skipableVariableType"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableType"] = array("string",integer,"double"); 
                #$conf["variableCheck::checkArguments"]["skipableVariableType"]=array("string","string");
                #$conf["skipableVarDefaultValue"],字串陣列,每個不存在的可省略變數要初始化為什麼,null與代表不指定,若預設值是必填參數之一,請將$conf["mustBeFilledVar"]改成"\$conf["\mustBeFilledVar\"]".
                #$conf["variableCheck::checkArguments"]["skipableVarDefaultValue"]=array(null,"Asia/Taipei");
                #$conf["arrayCountEqualCheck"],字串陣列,為檢查哪些陣列參數的元素數量要一樣,$conf["arrayCountEqualCheck"][$i]=array()為第$i組key為哪些的變數其元素數量要相等.
                #$conf["arrayCountEqualCheck"][]=array();
                #參考資料來源:
                #array_keys=>http://php.net/manual/en/function.array-keys.php
                $checkResult=variableCheck::checkArguments($conf["variableCheck::checkArguments"]);
                unset($conf["variableCheck::checkArguments"]);
                                        
                #如果檢查失敗
                if($checkResult["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                        
                #如果檢查不通過
                if($checkResult["passed"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end

                #如果 thisMonth參數 不為 1~12
                if($conf["thisMonth"]<1 || $conf["thisMonth"]>12){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"][]="thisMonth參數必須為「1~12」";
                        
                        #回傳結果
                        return $result;
                        
                        }#if end

                #如果目前是1月份
                if($conf["thisMonth"]==1){

                        #年度會減1
                        $result["yearChanged"]=true;

                        #則上個月就是12月份
                        $result["lastMonth"]=12;

                        #設置執行正常
                        $result["status"]="true";

                        #回傳結果
                        return $result;                         
                        
                        }#if end

                #反之
                else{

                        #年度不改變
                        $result["yearChanged"]=false;

                        #計算上個月份是幾月
                        $result["lastMonth"]=$conf["thisMonth"]-1;
                
                        #設置執行正常
                        $result["status"]="true";
                
                        #回傳結果
                        return $result;
                        
                        }#else end
                        
                #執行到這邊代表不正常
                $result["status"]="false";
                
                #設置執行錯誤
                $result["error"][]="非預期的錯誤";
                
                #回傳結果
                return $result;

                }#unction getLasrtMonth end
        
        /*
        #函式說明:
        #檢查當月份減1的時候,年度是否要減1,並回傳月份減1之後的西元年度.
        #回傳結果:
        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
        #$reuslt["error"],執行不正常結束的錯訊息陣列.
        #$result["function"],當前執行的函式名稱.
        #$result["yearChanged"],爲年份是否有改變,true表示有改變,false表示沒有改變.
        #$result["changedWestYear"],回傳月份減1之後的西元年度.
        #必填參數:
        #$conf["thisMonth"],整數,目前的月份.
        $conf["thisMonth"]=;
        #$conf["thisWestYear"],整數,目前的西元年.
        $conf["thisWestYear"]=;
        #可省略參數:
        #無.
        #參考資料:
        #無.
        #備註:
        #無.
        */      
        public static function checkWestYearWhenMonthChanged(&$conf){

                #初始化要回傳的結果
                $result=array();
                
                #設置當其函數名稱
                $result["function"]=__FUNCTION__;
                
                #如果 $conf 不為陣列
                if(gettype($conf)!="array"){
                        
                        #設置執行失敗
                        $result["status"]="false";
                        
                        #設置執行錯誤訊息
                        $result["error"][]="\$conf變數須為陣列形態";

                        #如果傳入的參數為 null
                        if($conf==null){
                                
                                #設置執行錯誤訊息
                                $result["error"][]="\$conf變數不得為null,請檢查函數「".$result["function"]."」的參數設置有無正確!";
                                
                                }#if end

                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #檢查參數
                #函式說明:
                #檢查必填與可省略的參數,可省略參數可指定預設要給與什麼數值內容。
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$reuslt["error"],執行不正常結束的錯訊息陣列.
                #$result["function"],當前執行的函式名稱.
                #$result["passed"],識別要檢查的全體變數是否存在以及型態是否正確的變數,"true"代表檢查全部通過;"false"代表檢查不通過
                #$result[$shouldBtCheckedVarName]["varExist"],所檢查的變數是否存在,"false"代表不存在;"true"代表存在
                #$result[$shouldBtCheckedVarName]["varType"],所檢查的變數型態是否正確,"false"代表錯誤;"true"代表正確
                #$result[$shouldBtCheckedVarName]["error"],每個參數設定的錯誤訊息
                #$result["argu"],字串陣列,目前輸入的參數名稱陣列.
                #$result["legalVarName"],字串陣列,合法可用的參數名稱陣列.
                #$result["notNeedVar"],字串陣列,多餘的參數名稱.
                #必填寫的參數:
                #$conf["varInput"],陣列變數,要檢查的陣列變數,請在要檢查的參數前面加上&,這樣變動的結果才能被套用。
                $conf["variableCheck::checkArguments"]["varInput"]=&$conf;
                #$conf["mustBeFilledVariableName"],爲必填參數的變數名稱陣列,形態爲陣列變數,例如: $conf["mustBeFilledVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableName"]=array("thisMonth","thisWestYear");
                #$conf["mustBeFilledVariableType"],爲必填參數的變數陣列應該爲何種變數形態,形態爲陣列 例如: $conf["mustBeFilledVariableType"] = array("string",integer,"double"); 
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableType"]=array("integer","integer");
                #$conf["referenceVarKey"],字串,$conf參數後面的key值,用於移除不要的參考陣列.
                $conf["variableCheck::checkArguments"]["referenceVarKey"]="variableCheck::checkArguments";
                #可以省略的參數:
                #$conf["skipableVariableCanNotBeEmpty"],字串陣列,哪些可省略參數不可以為空字串或集合.
                #$conf["variableCheck::checkArguments"]["skipableVariableCanNotBeEmpty"]=array("startTime","timeZone");
                #$conf["canBeEmptyString"],必填變數內容如果是空字串就不能算是有設置的話,請設為"false",預設爲"true"。
                #$conf["variableCheck::checkArguments"]["canBeEmptyString"]="false";
                #$conf["skipableVariableName"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableName"] = array("id","account","password");
                #$conf["variableCheck::checkArguments"]["skipableVariableName"]=array("startTime","timeZone");
                #$conf["skipableVariableType"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableType"] = array("string",integer,"double"); 
                #$conf["variableCheck::checkArguments"]["skipableVariableType"]=array("string","string");
                #$conf["skipableVarDefaultValue"],字串陣列,每個不存在的可省略變數要初始化為什麼,null與代表不指定,若預設值是必填參數之一,請將$conf["mustBeFilledVar"]改成"\$conf["\mustBeFilledVar\"]".
                #$conf["variableCheck::checkArguments"]["skipableVarDefaultValue"]=array(null,"Asia/Taipei");
                #$conf["arrayCountEqualCheck"],字串陣列,為檢查哪些陣列參數的元素數量要一樣,$conf["arrayCountEqualCheck"][$i]=array()為第$i組key為哪些的變數其元素數量要相等.
                #$conf["arrayCountEqualCheck"][]=array();
                #參考資料來源:
                #array_keys=>http://php.net/manual/en/function.array-keys.php
                $checkResult=variableCheck::checkArguments($conf["variableCheck::checkArguments"]);
                unset($conf["variableCheck::checkArguments"]);
                                        
                #如果檢查失敗
                if($checkResult["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                        
                #如果檢查不通過
                if($checkResult["passed"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end

                #檢查年份是否需要變更
                #函式說明:
                #求算上個月份是幾月
                #回傳結果:
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$reuslt["error"],執行不正常結束的錯訊息陣列.
                #$result["function"],當前執行的函式名稱.
                #$result["lastMonth"],上個月份
                #$result["yearChanged"],若爲true則代表年度要減1,若爲false則年度不變。
                #必填參數:
                #$conf["thisMonth"],整數,當前的月份.
                $conf["time::getLastMonth"]["thisMonth"]=$conf["thisMonth"];
                $result_getLastMonth=time::getLastMonth($conf["time::getLastMonth"]);
                unset($conf["time::getLastMonth"]);

                #如果取得失敗
                if($result_getLastMonth["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$result_getLastMonth;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #如果 $result_getLastMonth["yearChanged"] 爲 true
                if($result_getLastMonth["yearChanged"]==true){

                        #設定年度有改變
                        $result["yearChanged"]=true;

                        #設定變更後的年度
                        $result["changedWestYear"]=$conf["thisWestYear"]-1;

                        #設置執行正常
                        $result["status"]="true";

                        #回傳結果
                        return $result;

                        }#if end

                else{

                        #設定年度沒有改變
                        $result["yearChanged"]=false;

                        #設定變更後的年度
                        $result["changedWestYear"]=$conf["thisWestYear"];
                        
                        #設置執行正常
                        $result["status"]="true";
                        
                        #回傳結果
                        return $result;

                        }#else end
                        
                #執行到這邊代表不正常
                $result["status"]="false";
                
                #設置執行錯誤
                $result["error"][]="非預期的錯誤";
                
                #回傳結果
                return $result;

                }#function checkWestYearWhenMonthChanged end
        
        /*      
        #函式說明:
        #計算時間點距離1970/01/01多少秒,亦即unixtime.
        #回傳結果:
        #$result["stauts"],執行是否成功,"true"代表執行成功;"false"代表執行失敗.
        #$result["error"],錯誤訊息陣列.
        #$result["content"],時間點距離1970/01/01的多少秒.
        #$result["argu"],使用的參數.
        #$result["unixtime"],執行本函式時的unixtime.
        #$result["oriDateAndTime"],原始輸入的內容,若replace0參數為"true",才會有該回傳內容.   
        #必填參數:
        #$conf["dateAndTime"],字串,格式爲 2011-05-27 23:59:59.
        $conf["dateAndTime"]="";
        #可省略參數:
        #$conf["UTC"],字串,是否要用當前時區的設定去換算成unixtime,預設為"false",代表不要;反之為"true".
        #$conf["UTC"]="false";
        #$conf["replace0"],字串,是否要將連續為0的內容替換成當下時間,預設為"true"代表要;反之為"false".
        #$conf["replace0"]="true";
        #參考資料:
        #無.
        #備註:
        #無.
        */
        public static function caculateTimeAmount(&$conf){
                
                #初始化要回傳的結果
                $result=array();
                
                #設置當其函數名稱
                $result["function"]=__FUNCTION__;
                
                #如果 $conf 不為陣列
                if(gettype($conf)!="array"){
                        
                        #設置執行失敗
                        $result["status"]="false";
                        
                        #設置執行錯誤訊息
                        $result["error"][]="\$conf變數須為陣列形態";

                        #如果傳入的參數為 null
                        if($conf==null){
                                
                                #設置執行錯誤訊息
                                $result["error"][]="\$conf變數不得為null,請檢查函數「".$result["function"]."」的參數設置有無正確!";
                                
                                }#if end

                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #取得使用的參數
                $result["argu"]=$conf;
                
                #檢查參數
                #函式說明:
                #檢查必填與可省略的參數,可省略參數可指定預設要給與什麼數值內容。
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$reuslt["error"],執行不正常結束的錯訊息陣列.
                #$result["function"],當前執行的函式名稱.
                #$result["passed"],識別要檢查的全體變數是否存在以及型態是否正確的變數,"true"代表檢查全部通過;"false"代表檢查不通過
                #$result[$shouldBtCheckedVarName]["varExist"],所檢查的變數是否存在,"false"代表不存在;"true"代表存在
                #$result[$shouldBtCheckedVarName]["varType"],所檢查的變數型態是否正確,"false"代表錯誤;"true"代表正確
                #$result[$shouldBtCheckedVarName]["error"],每個參數設定的錯誤訊息
                #$result["argu"],字串陣列,目前輸入的參數名稱陣列.
                #$result["legalVarName"],字串陣列,合法可用的參數名稱陣列.
                #$result["notNeedVar"],字串陣列,多餘的參數名稱.
                #必填寫的參數:
                #$conf["varInput"],陣列變數,要檢查的陣列變數,請在要檢查的參數前面加上&,這樣變動的結果才能被套用。
                $conf["variableCheck::checkArguments"]["varInput"]=&$conf;
                #$conf["mustBeFilledVariableName"],爲必填參數的變數名稱陣列,形態爲陣列變數,例如: $conf["mustBeFilledVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableName"]=array("dateAndTime");
                #$conf["mustBeFilledVariableType"],爲必填參數的變數陣列應該爲何種變數形態,形態爲陣列 例如: $conf["mustBeFilledVariableType"] = array("string",integer,"double"); 
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableType"]=array("string");
                #$conf["referenceVarKey"],字串,$conf參數後面的key值,用於移除不要的參考陣列.
                $conf["variableCheck::checkArguments"]["referenceVarKey"]="variableCheck::checkArguments";
                #可以省略的參數:
                #$conf["skipableVariableCanNotBeEmpty"],字串陣列,哪些可省略參數不可以為空字串或集合.
                $conf["variableCheck::checkArguments"]["skipableVariableCanNotBeEmpty"]=array("UTC","replace0");
                #$conf["canBeEmptyString"],必填變數內容如果是空字串就不能算是有設置的話,請設為"false",預設爲"true"。
                $conf["variableCheck::checkArguments"]["canBeEmptyString"]="false";
                #$conf["skipableVariableName"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["skipableVariableName"]=array("UTC","replace0");
                #$conf["skipableVariableType"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableType"] = array("string",integer,"double"); 
                $conf["variableCheck::checkArguments"]["skipableVariableType"]=array("string","string");
                #$conf["skipableVarDefaultValue"],字串陣列,每個不存在的可省略變數要初始化為什麼,null與代表不指定,若預設值是必填參數之一,請將$conf["mustBeFilledVar"]改成"\$conf["\mustBeFilledVar\"]".
                $conf["variableCheck::checkArguments"]["skipableVarDefaultValue"]=array("false","true");
                #$conf["arrayCountEqualCheck"],字串陣列,為檢查哪些陣列參數的元素數量要一樣,$conf["arrayCountEqualCheck"][$i]=array()為第$i組key為哪些的變數其元素數量要相等.
                #$conf["arrayCountEqualCheck"][]=array();
                #參考資料來源:
                #array_keys=>http://php.net/manual/en/function.array-keys.php
                $checkResult=variableCheck::checkArguments($conf["variableCheck::checkArguments"]);
                unset($conf["variableCheck::checkArguments"]);
                
                #如果檢查失敗
                if($checkResult["status"]=="false"){
                        
                        #設置執行失敗的訊息
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #如果檢查不通過
                if($checkResult["passed"]=="false"){
                        
                        #設置執行失敗的訊息
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #檢查 dateAndTime 參數的格式,正確格式爲 2011-05-27 23:59:59 - start
                
                #初始化要給 variableCheck::checkStringFormat 使用的參數
                $sectionArguForCheckStringFormat=array();
                
                #"2011-05-27 23:59:59" 可以拆解成 "2011-"、"05-"、"27 23:"、"59:59" 4段
                
                #針對每個 section
                for($i=0;$i<4;$i++){
                
                        #判斷是哪一段
                        switch($i){
                        
                                #如果是 "2011-"
                                case 0:
                                
                                        #初始化暫存的參數陣列
                                        $argu=array();
                                
                                        #長度為5bytes
                                        $argu["length"]="5";
                                        
                                        #"-"結尾
                                        $argu["endWith"]="-";
                                        
                                        #儲存section的參數
                                        $sectionArguForCheckStringFormat[]=$argu;
                                
                                        #跳出 switch
                                        break;
                                        
                                #如果是 "05-"
                                case 1:
                                
                                        #初始化暫存的參數陣列
                                        $argu=array();
                                
                                        #長度為5bytes
                                        $argu["length"]="3";
                                        
                                        #"-"結尾
                                        $argu["endWith"]="-";
                                        
                                        #儲存section的參數
                                        $sectionArguForCheckStringFormat[]=$argu;
                                
                                        #跳出 switch
                                        break;
                                        
                                #如果是 "27 23:"
                                case 2:
                                
                                        #初始化暫存的參數陣列
                                        $argu=array();
                                
                                        #長度為5bytes
                                        $argu["length"]="6";
                                        
                                        #" "居中
                                        $argu["centerWith"]=" ";
                                        
                                        #":"結尾
                                        $argu["endWith"]=":";
                                        
                                        #儲存section的參數
                                        $sectionArguForCheckStringFormat[]=$argu;
                                
                                        #跳出 switch
                                        break;
                                        
                                #如果是 "59:59"
                                case 3:
                                
                                        #初始化暫存的參數陣列
                                        $argu=array();
                                
                                        #長度為5bytes
                                        $argu["length"]="5";
                                        
                                        #":"居中
                                        $argu["centerWith"]=":";
                                                                                
                                        #儲存section的參數
                                        $sectionArguForCheckStringFormat[]=$argu;
                                
                                        #跳出 switch
                                        break;
                                
                                #其他狀況
                                default:
                                
                                        #設置執行失敗的識別
                                        $result["status"]="false";
                                                
                                        #設置錯誤訊息
                                        $result["error"][]="非預期的錯誤";
                                                
                                        #回傳結果
                                        return $result;
                        
                                }#switch end
                
                        }#for end
                
                #函式說明:
                #檢查字串是否符合指定格式
                #回傳結果:
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$result["passed"],檢查是否通過,"true"代表通過,"false"代表不通過.
                #$result["content"],詳細結果訊息陣列,若passed為"false"則會有該內容.
                #$result["newInputArgu"],剩下尚未檢驗格式的input.
                #$result["function"],當前執行的函數.
                #$result["error"],涵式錯誤訊息陣列.
                #必填參數:
                #$conf["input"],字串,要檢查格式的字串.
                $conf["variableCheck::checkStringFormat"]["input"]=$conf["dateAndTime"];
                #可省略參數:
                #$conf["equalWith"],字串,輸入字串是否等於該參數內容.
                #$conf["equalWith"]="";
                #$conf["startWith"],字串,開頭要是什麼字串內容.
                #$conf["startWith"]="";
                #$conf["endWith"],字串,結尾要是什麼字串內容.
                #$conf["endWith"]="";
                #$conf["centerWith"],字串,非開頭(預設無,若有指定startWith參數,則為該參數內容)跟結尾(預設無,若有指定endWith參數,則為該參數內容)的內容中要有什麼字串.
                #$conf["centerWith"]="";
                #$conf["length"],字串整數,字串的長度要多少(bytes).
                #$conf["length"]="";
                #$conf["lengthGrapheme"],字串整數,字串的長度要多少字位(grapheme).
                #$conf["lengthGrapheme"]="";
                #$conf["section"],字串陣列,元素數量代表,輸入字串的格式可以區分成多少段.每個元素為本函式的參數陣列剔除input跟section參數.
                $conf["variableCheck::checkStringFormat"]["section"]=$sectionArguForCheckStringFormat;
                #參考資料:
                #grapheme_strlen=>https://www.php.net/manual/en/function.grapheme-strlen.php
                #grapheme/字位/可以書寫的最小單位=>https://zh.wikipedia.org/zh-tw/%E5%AD%97%E4%BD%8D
                #grapheme_substr=>https://www.php.net/manual/en/function.grapheme-substr.php
                #備註:
                #無.
                $checkStringFormat=variableCheck::checkStringFormat($conf["variableCheck::checkStringFormat"]);
                unset($conf["variableCheck::checkStringFormat"]);
                
                #如果執行出錯
                if($checkStringFormat["status"]==="false"){
                        
                        #設置執行失敗的訊息
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkStringFormat;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                        
                #如果格式不對
                if($checkStringFormat["passed"]==="false"){
                        
                        #設置執行失敗的訊息
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkStringFormat;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #儲存當前的 unixtime
                $result["unixtime"]=time();
                
                #如果要替換連續為0的內容
                if($conf["replace0"]==="true"){
                
                        #記錄原始輸入的 dateAndTime 參數
                        $result["oriDateAndTime"]=$conf["dateAndTime"];
                        
                        #初始化記錄 dateAndTime 參數是否有被修正
                        $dateAndTimeModified=array();
                        
                        #初始化記錄 dateAndTime 參數的年沒有被修正
                        $dateAndTimeModified["Y"]="false";
                        
                        #初始化記錄 dateAndTime 參數的月沒有被修正
                        $dateAndTimeModified["m"]="false";
                        
                        #初始化記錄 dateAndTime 參數的日沒有被修正
                        $dateAndTimeModified["d"]="false";
                        
                        #初始化記錄 dateAndTime 參數的時沒有被修正
                        $dateAndTimeModified["H"]="false";
                        
                        #初始化記錄 dateAndTime 參數的分沒有被修正
                        $dateAndTimeModified["i"]="false";
                        
                        #初始化記錄 dateAndTime 參數的秒沒有被修正
                        $dateAndTimeModified["s"]="false";
                        
                        #取得當前unixtime
                        $currentUnixTime=$result["unixtime"];
                        
                        #取得當前的年份
                        $currentYear=gmdate("Y",$currentUnixTime);
                        
                        #取得當前的月份
                        $currentMonth=gmdate("m",$currentUnixTime);
                        
                        #取得當前的日
                        $currentDay=gmdate("d",$currentUnixTime);
                        
                        #取得當前的小時
                        $currentHour=gmdate("H",$currentUnixTime);
                        
                        #取得當前的分鐘
                        $currentMin=gmdate("i",$currentUnixTime);
                        
                        #取得當前的秒鐘
                        $currentSec=gmdate("s",$currentUnixTime);
                        
                        #函式說明:
                        #將固定格式的字串分開,並回傳分開的結果.
                        #回傳結果:
                        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                        #$result["error"],錯誤訊息陣列
                        #$result["function"],當前執行的函數名稱.
                        #$result["argu"],使用的參數.
                        #$result["oriStr"],要分割的原始字串內容
                        #$result["dataArray"],爲分割好字串的陣列內容,$result["dataArray"][$i]爲第($i+1)段的內容。
                        #$result["dataCounts"],爲總共分成幾段
                        #$result["found"],是否有在$conf["stringIn"]找到$conf["spiltSymbol"],"true"代表有找到,"false"代表沒有找到.
                        #必填參數:
                        #$conf["stringIn"],字串,要處理的字串.
                        $conf["stringProcess::spiltString"]["stringIn"]=$conf["dateAndTime"];
                        #$conf["spiltSymbol"],字串,爲以哪個符號作爲分割.
                        $conf["stringProcess::spiltString"]["spiltSymbol"]="-";
                        #可省略參數:
                        #$conf["allowEmptyStr"],是否允許分割出來空字串,預設為"false"不允許;"true"代表允許.
                        $conf["stringProcess::spiltString"]["allowEmptyStr"]="false";
                        #參考資料:
                        #無.
                        #備註:
                        #無.
                        $spiltString=stringProcess::spiltString($conf["stringProcess::spiltString"]);
                        unset($conf["stringProcess::spiltString"]);
                        
                        #如果執行出錯
                        if($spiltString["status"]==="false"){
                                
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                                
                                }#if end
                        
                        #如果沒有關鍵字存在
                        if($spiltString["found"]==="false"){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                                
                        #如果沒有關鍵字存在
                        if($spiltString["found"]==="false"){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                        
                        #如果分割出來不是3段
                        if($spiltString["dataCounts"]!==3){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                        
                        #預設新的 dateAndTime 參數跟輸入參數沒有差異
                        $newDateAndTime=$conf["dateAndTime"];
                        
                        #如果西元年為0000
                        if($spiltString["dataArray"][0]==="0000"){
                        
                                #重新組合新的  dateAndTime                        
                                $newDateAndTime=$currentYear."-".$spiltString["dataArray"][1]."-".$spiltString["dataArray"][2];
                                        
                                #更新到輸入參數
                                $conf["dateAndTime"]=$newDateAndTime;
                                        
                                #記錄 dateAndTime 參數的年有被修正
                                $dateAndTimeModified["Y"]="true";
                                        
                                }#if end
                        
                        #函式說明:
                        #將固定格式的字串分開,並回傳分開的結果.
                        #回傳結果:
                        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                        #$result["error"],錯誤訊息陣列
                        #$result["function"],當前執行的函數名稱.
                        #$result["argu"],使用的參數.
                        #$result["oriStr"],要分割的原始字串內容
                        #$result["dataArray"],爲分割好字串的陣列內容,$result["dataArray"][$i]爲第($i+1)段的內容。
                        #$result["dataCounts"],爲總共分成幾段
                        #$result["found"],是否有在$conf["stringIn"]找到$conf["spiltSymbol"],"true"代表有找到,"false"代表沒有找到.
                        #必填參數:
                        #$conf["stringIn"],字串,要處理的字串.
                        $conf["stringProcess::spiltString"]["stringIn"]=$conf["dateAndTime"];
                        #$conf["spiltSymbol"],字串,爲以哪個符號作爲分割.
                        $conf["stringProcess::spiltString"]["spiltSymbol"]="-";
                        #可省略參數:
                        #$conf["allowEmptyStr"],是否允許分割出來空字串,預設為"false"不允許;"true"代表允許.
                        $conf["stringProcess::spiltString"]["allowEmptyStr"]="false";
                        #參考資料:
                        #無.
                        #備註:
                        #無.
                        $spiltString=stringProcess::spiltString($conf["stringProcess::spiltString"]);
                        unset($conf["stringProcess::spiltString"]);
                        
                        #如果執行出錯
                        if($spiltString["status"]==="false"){
                                
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                                
                                }#if end
                        
                        #如果沒有關鍵字存在
                        if($spiltString["found"]==="false"){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                                
                        #如果沒有關鍵字存在
                        if($spiltString["found"]==="false"){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                        
                        #如果分割出來不是3段
                        if($spiltString["dataCounts"]!==3){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                        
                        #預設新的 dateAndTime 參數跟輸入參數沒有差異
                        $newDateAndTime=$conf["dateAndTime"];
                        
                        #如果年、月分別為0000、00
                        if( $dateAndTimeModified["Y"]==="true" && $spiltString["dataArray"][1]==="00" ){
                        
                                #重新組合新的  dateAndTime                        
                                $newDateAndTime=$spiltString["dataArray"][0]."-".$currentMonth."-".$spiltString["dataArray"][2];
                                        
                                #更新到輸入參數
                                $conf["dateAndTime"]=$newDateAndTime;
                                
                                #記錄 dateAndTime 參數的月有被修正
                                $dateAndTimeModified["m"]="true";
                                        
                                }#if end
                        
                        #函式說明:
                        #將固定格式的字串分開,並回傳分開的結果.
                        #回傳結果:
                        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                        #$result["error"],錯誤訊息陣列
                        #$result["function"],當前執行的函數名稱.
                        #$result["argu"],使用的參數.
                        #$result["oriStr"],要分割的原始字串內容
                        #$result["dataArray"],爲分割好字串的陣列內容,$result["dataArray"][$i]爲第($i+1)段的內容。
                        #$result["dataCounts"],爲總共分成幾段
                        #$result["found"],是否有在$conf["stringIn"]找到$conf["spiltSymbol"],"true"代表有找到,"false"代表沒有找到.
                        #必填參數:
                        #$conf["stringIn"],字串,要處理的字串.
                        $conf["stringProcess::spiltString"]["stringIn"]=$conf["dateAndTime"];
                        #$conf["spiltSymbol"],字串,爲以哪個符號作爲分割.
                        $conf["stringProcess::spiltString"]["spiltSymbol"]=" ";
                        #可省略參數:
                        #$conf["allowEmptyStr"],是否允許分割出來空字串,預設為"false"不允許;"true"代表允許.
                        $conf["stringProcess::spiltString"]["allowEmptyStr"]="false";
                        #參考資料:
                        #無.
                        #備註:
                        #無.
                        $spiltString=stringProcess::spiltString($conf["stringProcess::spiltString"]);
                        unset($conf["stringProcess::spiltString"]);
                        
                        #如果執行出錯
                        if($spiltString["status"]==="false"){
                                
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                                
                                }#if end
                        
                        #如果沒有關鍵字存在
                        if($spiltString["found"]==="false"){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                                
                        #如果沒有關鍵字存在
                        if($spiltString["found"]==="false"){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                        
                        #如果分割出來不是2段
                        if($spiltString["dataCounts"]!==2){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                        
                        #取得輸入參數的時分秒
                        $inputHMS=$spiltString["dataArray"][1];
                        
                        #函式說明:
                        #將固定格式的字串分開,並回傳分開的結果.
                        #回傳結果:
                        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                        #$result["error"],錯誤訊息陣列
                        #$result["function"],當前執行的函數名稱.
                        #$result["argu"],使用的參數.
                        #$result["oriStr"],要分割的原始字串內容
                        #$result["dataArray"],爲分割好字串的陣列內容,$result["dataArray"][$i]爲第($i+1)段的內容。
                        #$result["dataCounts"],爲總共分成幾段
                        #$result["found"],是否有在$conf["stringIn"]找到$conf["spiltSymbol"],"true"代表有找到,"false"代表沒有找到.
                        #必填參數:
                        #$conf["stringIn"],字串,要處理的字串.
                        $conf["stringProcess::spiltString"]["stringIn"]=$spiltString["dataArray"][0];
                        #$conf["spiltSymbol"],字串,爲以哪個符號作爲分割.
                        $conf["stringProcess::spiltString"]["spiltSymbol"]="-";
                        #可省略參數:
                        #$conf["allowEmptyStr"],是否允許分割出來空字串,預設為"false"不允許;"true"代表允許.
                        $conf["stringProcess::spiltString"]["allowEmptyStr"]="false";
                        #參考資料:
                        #無.
                        #備註:
                        #無.
                        $spiltString=stringProcess::spiltString($conf["stringProcess::spiltString"]);
                        unset($conf["stringProcess::spiltString"]);
                        
                        #如果執行出錯
                        if($spiltString["status"]==="false"){
                                
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                                
                                }#if end
                        
                        #如果沒有關鍵字存在
                        if($spiltString["found"]==="false"){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                                
                        #如果沒有關鍵字存在
                        if($spiltString["found"]==="false"){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                        
                        #如果分割出來不是3段
                        if($spiltString["dataCounts"]!==3){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                                
                        #預設新的 dateAndTime 參數跟輸入參數沒有差異
                        $newDateAndTime=$conf["dateAndTime"];
                        
                        #如果年、月、日分別為0000、00、00
                        if( $dateAndTimeModified["m"]==="true" && $spiltString["dataArray"][2]==="00" ){
                        
                                #重新組合新的  dateAndTime                        
                                $newDateAndTime=$spiltString["dataArray"][0]."-".$spiltString["dataArray"][1]."-".$currentDay." ".$inputHMS;
                                        
                                #更新到輸入參數
                                $conf["dateAndTime"]=$newDateAndTime;
                                
                                #記錄 dateAndTime 參數的日有被修正
                                $dateAndTimeModified["d"]="true";
                                
                                }#if end
                                
                        #函式說明:
                        #將固定格式的字串分開,並回傳分開的結果.
                        #回傳結果:
                        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                        #$result["error"],錯誤訊息陣列
                        #$result["function"],當前執行的函數名稱.
                        #$result["argu"],使用的參數.
                        #$result["oriStr"],要分割的原始字串內容
                        #$result["dataArray"],爲分割好字串的陣列內容,$result["dataArray"][$i]爲第($i+1)段的內容。
                        #$result["dataCounts"],爲總共分成幾段
                        #$result["found"],是否有在$conf["stringIn"]找到$conf["spiltSymbol"],"true"代表有找到,"false"代表沒有找到.
                        #必填參數:
                        #$conf["stringIn"],字串,要處理的字串.
                        $conf["stringProcess::spiltString"]["stringIn"]=$conf["dateAndTime"];
                        #$conf["spiltSymbol"],字串,爲以哪個符號作爲分割.
                        $conf["stringProcess::spiltString"]["spiltSymbol"]=" ";
                        #可省略參數:
                        #$conf["allowEmptyStr"],是否允許分割出來空字串,預設為"false"不允許;"true"代表允許.
                        $conf["stringProcess::spiltString"]["allowEmptyStr"]="false";
                        #參考資料:
                        #無.
                        #備註:
                        #無.
                        $spiltString=stringProcess::spiltString($conf["stringProcess::spiltString"]);
                        unset($conf["stringProcess::spiltString"]);
                        
                        #如果執行出錯
                        if($spiltString["status"]==="false"){
                                
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                                
                                }#if end
                        
                        #如果沒有關鍵字存在
                        if($spiltString["found"]==="false"){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                                
                        #如果沒有關鍵字存在
                        if($spiltString["found"]==="false"){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                        
                        #如果分割出來不是2段
                        if($spiltString["dataCounts"]!==2){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                        
                        #取得輸入參數的年月日
                        $inputYMD=$spiltString["dataArray"][0];
                        
                        #函式說明:
                        #將固定格式的字串分開,並回傳分開的結果.
                        #回傳結果:
                        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                        #$result["error"],錯誤訊息陣列
                        #$result["function"],當前執行的函數名稱.
                        #$result["argu"],使用的參數.
                        #$result["oriStr"],要分割的原始字串內容
                        #$result["dataArray"],爲分割好字串的陣列內容,$result["dataArray"][$i]爲第($i+1)段的內容。
                        #$result["dataCounts"],爲總共分成幾段
                        #$result["found"],是否有在$conf["stringIn"]找到$conf["spiltSymbol"],"true"代表有找到,"false"代表沒有找到.
                        #必填參數:
                        #$conf["stringIn"],字串,要處理的字串.
                        $conf["stringProcess::spiltString"]["stringIn"]=$spiltString["dataArray"][1];
                        #$conf["spiltSymbol"],字串,爲以哪個符號作爲分割.
                        $conf["stringProcess::spiltString"]["spiltSymbol"]=":";
                        #可省略參數:
                        #$conf["allowEmptyStr"],是否允許分割出來空字串,預設為"false"不允許;"true"代表允許.
                        $conf["stringProcess::spiltString"]["allowEmptyStr"]="false";
                        #參考資料:
                        #無.
                        #備註:
                        #無.
                        $spiltString=stringProcess::spiltString($conf["stringProcess::spiltString"]);
                        unset($conf["stringProcess::spiltString"]);
                        
                        #如果執行出錯
                        if($spiltString["status"]==="false"){
                                
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                                
                                }#if end
                        
                        #如果沒有關鍵字存在
                        if($spiltString["found"]==="false"){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                                
                        #如果沒有關鍵字存在
                        if($spiltString["found"]==="false"){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                        
                        #如果分割出來不是3段
                        if($spiltString["dataCounts"]!==3){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                                
                        #如果年、月、日、時分別為0000、00、00、00
                        if( $dateAndTimeModified["d"]==="true" && $spiltString["dataArray"][0]==="00" ){
                        
                                #重新組合新的  dateAndTime                        
                                $newDateAndTime=$inputYMD." ".$currentHour.":".$spiltString["dataArray"][1].":".$spiltString["dataArray"][2];
                                        
                                #更新到輸入參數
                                $conf["dateAndTime"]=$newDateAndTime;
                                
                                #記錄 dateAndTime 參數的時有被修正
                                $dateAndTimeModified["H"]="true";
                                
                                }#if end
                                
                        #反之
                        else{
                        
                                #確認小時格式是否正確
                                
                                #如果小時大於等於24
                                if((int)$spiltString["dataArray"][0]>=24){
                                
                                        #設置執行失敗的訊息
                                        $result["status"]="false";
                                        
                                        #設置錯誤訊息
                                        $result["error"][]="Hour(".$spiltString["dataArray"][0].") not supported";
                                        
                                        #回傳結果
                                        return $result;
                                
                                        }#if end
                        
                                }#else end
                                
                        #函式說明:
                        #將固定格式的字串分開,並回傳分開的結果.
                        #回傳結果:
                        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                        #$result["error"],錯誤訊息陣列
                        #$result["function"],當前執行的函數名稱.
                        #$result["argu"],使用的參數.
                        #$result["oriStr"],要分割的原始字串內容
                        #$result["dataArray"],爲分割好字串的陣列內容,$result["dataArray"][$i]爲第($i+1)段的內容。
                        #$result["dataCounts"],爲總共分成幾段
                        #$result["found"],是否有在$conf["stringIn"]找到$conf["spiltSymbol"],"true"代表有找到,"false"代表沒有找到.
                        #必填參數:
                        #$conf["stringIn"],字串,要處理的字串.
                        $conf["stringProcess::spiltString"]["stringIn"]=$conf["dateAndTime"];
                        #$conf["spiltSymbol"],字串,爲以哪個符號作爲分割.
                        $conf["stringProcess::spiltString"]["spiltSymbol"]=" ";
                        #可省略參數:
                        #$conf["allowEmptyStr"],是否允許分割出來空字串,預設為"false"不允許;"true"代表允許.
                        $conf["stringProcess::spiltString"]["allowEmptyStr"]="false";
                        #參考資料:
                        #無.
                        #備註:
                        #無.
                        $spiltString=stringProcess::spiltString($conf["stringProcess::spiltString"]);
                        unset($conf["stringProcess::spiltString"]);
                        
                        #如果執行出錯
                        if($spiltString["status"]==="false"){
                                
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                                
                                }#if end
                        
                        #如果沒有關鍵字存在
                        if($spiltString["found"]==="false"){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                                
                        #如果沒有關鍵字存在
                        if($spiltString["found"]==="false"){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                        
                        #如果分割出來不是2段
                        if($spiltString["dataCounts"]!==2){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                        
                        #取得輸入參數的年月日
                        $inputYMD=$spiltString["dataArray"][0];
                        
                        #函式說明:
                        #將固定格式的字串分開,並回傳分開的結果.
                        #回傳結果:
                        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                        #$result["error"],錯誤訊息陣列
                        #$result["function"],當前執行的函數名稱.
                        #$result["argu"],使用的參數.
                        #$result["oriStr"],要分割的原始字串內容
                        #$result["dataArray"],爲分割好字串的陣列內容,$result["dataArray"][$i]爲第($i+1)段的內容。
                        #$result["dataCounts"],爲總共分成幾段
                        #$result["found"],是否有在$conf["stringIn"]找到$conf["spiltSymbol"],"true"代表有找到,"false"代表沒有找到.
                        #必填參數:
                        #$conf["stringIn"],字串,要處理的字串.
                        $conf["stringProcess::spiltString"]["stringIn"]=$spiltString["dataArray"][1];
                        #$conf["spiltSymbol"],字串,爲以哪個符號作爲分割.
                        $conf["stringProcess::spiltString"]["spiltSymbol"]=":";
                        #可省略參數:
                        #$conf["allowEmptyStr"],是否允許分割出來空字串,預設為"false"不允許;"true"代表允許.
                        $conf["stringProcess::spiltString"]["allowEmptyStr"]="false";
                        #參考資料:
                        #無.
                        #備註:
                        #無.
                        $spiltString=stringProcess::spiltString($conf["stringProcess::spiltString"]);
                        unset($conf["stringProcess::spiltString"]);
                        
                        #如果執行出錯
                        if($spiltString["status"]==="false"){
                                
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                                
                                }#if end
                        
                        #如果沒有關鍵字存在
                        if($spiltString["found"]==="false"){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                                
                        #如果沒有關鍵字存在
                        if($spiltString["found"]==="false"){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                        
                        #如果分割出來不是3段
                        if($spiltString["dataCounts"]!==3){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                                
                        #如果年、月、日、時、分分別為0000、00、00、00、00
                        if( $dateAndTimeModified["H"]==="true" && $spiltString["dataArray"][1]==="00" ){
                        
                                #重新組合新的  dateAndTime                        
                                $newDateAndTime=$inputYMD." ".$spiltString["dataArray"][0].":".$currentMin.":".$spiltString["dataArray"][2];
                                        
                                #更新到輸入參數
                                $conf["dateAndTime"]=$newDateAndTime;
                                
                                #記錄 dateAndTime 參數的分有被修正
                                $dateAndTimeModified["i"]="true";
                                
                                }#if end
                                
                        #反之
                        else{
                        
                                #確認分鐘格式是否正確
                                
                                #如果分鐘大於等於60
                                if((int)$spiltString["dataArray"][1]>=60){
                                
                                        #設置執行失敗的訊息
                                        $result["status"]="false";
                                        
                                        #設置錯誤訊息
                                        $result["error"][]="Min(".$spiltString["dataArray"][1].") not supported";
                                        
                                        #回傳結果
                                        return $result;
                                
                                        }#if end
                        
                                }#else end
                                
                        #函式說明:
                        #將固定格式的字串分開,並回傳分開的結果.
                        #回傳結果:
                        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                        #$result["error"],錯誤訊息陣列
                        #$result["function"],當前執行的函數名稱.
                        #$result["argu"],使用的參數.
                        #$result["oriStr"],要分割的原始字串內容
                        #$result["dataArray"],爲分割好字串的陣列內容,$result["dataArray"][$i]爲第($i+1)段的內容。
                        #$result["dataCounts"],爲總共分成幾段
                        #$result["found"],是否有在$conf["stringIn"]找到$conf["spiltSymbol"],"true"代表有找到,"false"代表沒有找到.
                        #必填參數:
                        #$conf["stringIn"],字串,要處理的字串.
                        $conf["stringProcess::spiltString"]["stringIn"]=$conf["dateAndTime"];
                        #$conf["spiltSymbol"],字串,爲以哪個符號作爲分割.
                        $conf["stringProcess::spiltString"]["spiltSymbol"]=" ";
                        #可省略參數:
                        #$conf["allowEmptyStr"],是否允許分割出來空字串,預設為"false"不允許;"true"代表允許.
                        $conf["stringProcess::spiltString"]["allowEmptyStr"]="false";
                        #參考資料:
                        #無.
                        #備註:
                        #無.
                        $spiltString=stringProcess::spiltString($conf["stringProcess::spiltString"]);
                        unset($conf["stringProcess::spiltString"]);
                        
                        #如果執行出錯
                        if($spiltString["status"]==="false"){
                                
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                                
                                }#if end
                        
                        #如果沒有關鍵字存在
                        if($spiltString["found"]==="false"){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                                
                        #如果沒有關鍵字存在
                        if($spiltString["found"]==="false"){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                        
                        #如果分割出來不是2段
                        if($spiltString["dataCounts"]!==2){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                        
                        #取得輸入參數的年月日
                        $inputYMD=$spiltString["dataArray"][0];
                        
                        #函式說明:
                        #將固定格式的字串分開,並回傳分開的結果.
                        #回傳結果:
                        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                        #$result["error"],錯誤訊息陣列
                        #$result["function"],當前執行的函數名稱.
                        #$result["argu"],使用的參數.
                        #$result["oriStr"],要分割的原始字串內容
                        #$result["dataArray"],爲分割好字串的陣列內容,$result["dataArray"][$i]爲第($i+1)段的內容。
                        #$result["dataCounts"],爲總共分成幾段
                        #$result["found"],是否有在$conf["stringIn"]找到$conf["spiltSymbol"],"true"代表有找到,"false"代表沒有找到.
                        #必填參數:
                        #$conf["stringIn"],字串,要處理的字串.
                        $conf["stringProcess::spiltString"]["stringIn"]=$spiltString["dataArray"][1];
                        #$conf["spiltSymbol"],字串,爲以哪個符號作爲分割.
                        $conf["stringProcess::spiltString"]["spiltSymbol"]=":";
                        #可省略參數:
                        #$conf["allowEmptyStr"],是否允許分割出來空字串,預設為"false"不允許;"true"代表允許.
                        $conf["stringProcess::spiltString"]["allowEmptyStr"]="false";
                        #參考資料:
                        #無.
                        #備註:
                        #無.
                        $spiltString=stringProcess::spiltString($conf["stringProcess::spiltString"]);
                        unset($conf["stringProcess::spiltString"]);
                        
                        #如果執行出錯
                        if($spiltString["status"]==="false"){
                                
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                                
                                }#if end
                        
                        #如果沒有關鍵字存在
                        if($spiltString["found"]==="false"){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                                
                        #如果沒有關鍵字存在
                        if($spiltString["found"]==="false"){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                        
                        #如果分割出來不是3段
                        if($spiltString["dataCounts"]!==3){
                        
                                #設置執行失敗的訊息
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$spiltString;
                                
                                #回傳結果
                                return $result;
                        
                                }#if end
                                
                        #如果年、月、日、時、分、秒分別為0000、00、00、00、00、00
                        if( $dateAndTimeModified["i"]==="true" && $spiltString["dataArray"][2]==="00" ){
                        
                                #重新組合新的  dateAndTime                        
                                $newDateAndTime=$inputYMD." ".$spiltString["dataArray"][0].":".$spiltString["dataArray"][1].":".$currentSec;
                                        
                                #更新到輸入參數
                                $conf["dateAndTime"]=$newDateAndTime;
                                
                                #記錄 dateAndTime 參數的分有被修正
                                $dateAndTimeModified["s"]="true";
                                
                                }#if end
                                
                        #反之
                        else{
                        
                                #確認秒鐘格式是否正確
                                
                                #如果秒鐘大於等於60
                                if((int)$spiltString["dataArray"][2]>=60){
                                
                                        #設置執行失敗的訊息
                                        $result["status"]="false";
                                        
                                        #設置錯誤訊息
                                        $result["error"][]="Sec(".$spiltString["dataArray"][2].") not supported";
                                        
                                        #回傳結果
                                        return $result;
                                
                                        }#if end
                        
                                }#else end
                
                        }#if end
                                
                #檢查 dateAndTime 參數的格式,正確格式爲 2011-05-27 23:59:59 - end
                
                #產生date
                $date=date($conf["dateAndTime"]);
                
                #如果要用 UTC 時間
                if($conf["UTC"]==="true"){
                
                        #產生gmdate
                        $date=gmdate($conf["dateAndTime"]);
                
                        }#if end
                
                #取得時間量
                $result["content"]=strtotime($date);
                
                #設置執行成功
                $result["status"]="true";
                
                #回傳結果
                return $result;
                
                }#function caculateTimeAmount end 
                
        /*      
        #函式說明:
        #計算當前時間點距離西元元年多少秒
        #回傳結果:
        #當前時間點距離1970/01/01的多少秒
        #必填參數:
        #無.
        #可省略參數:
        #無.
        #參考資料:
        #無.
        #備註:
        #無.
        */
        public static function getMicrotime(){
                
                #回傳當前時間點距離1970/01/01多少秒
                return microtime(true);
                
                }#function getMicrotime end
                
        /*
        #函式說明:
        #將時間往後,n天
        #回傳結果:
        #$result["stauts"],執行是否成功,"true"代表執行成功;"false"代表執行失敗
        #$result["error"],錯誤訊息陣列.
        #$result["content"],往後延遲n天後的年月日.            
        #$result["year"],修改後的年份.
        #$result["month"],修改後的月份. 
        #$result["day"],修改後的日份.
        #必填參數:
        #$conf["delayDays"],字串,要往後延的天數.
        $conf["delayDays"]="1";
        #可省略參數:
        #無.
        #參考資料:
        #datetime.add=>http://tw1.php.net/manual/en/datetime.add.php
        #class.datetime=>http://tw1.php.net/manual/en/class.datetime.php
        #datetime.format=>http://tw1.php.net/manual/en/datetime.format.php
        #dateinterval.createfromdatestring=>http://tw1.php.net/manual/en/dateinterval.createfromdatestring.php
        #備註:
        #無.
        */
        public static function addTime(&$conf){
                        
                #初始化要回傳的結果
                $result=array();
                
                #設置當其函數名稱
                $result["function"]=__FUNCTION__;
                
                #如果 $conf 不為陣列
                if(gettype($conf)!="array"){
                        
                        #設置執行失敗
                        $result["status"]="false";
                        
                        #設置執行錯誤訊息
                        $result["error"][]="\$conf變數須為陣列形態";

                        #如果傳入的參數為 null
                        if($conf==null){
                                
                                #設置執行錯誤訊息
                                $result["error"][]="\$conf變數不得為null,請檢查函數「".$result["function"]."」的參數設置有無正確!";
                                
                                }#if end

                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #檢查參數
                #函式說明:
                #檢查必填與可省略的參數,可省略參數可指定預設要給與什麼數值內容。
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$reuslt["error"],執行不正常結束的錯訊息陣列.
                #$result["function"],當前執行的函式名稱.
                #$result["passed"],識別要檢查的全體變數是否存在以及型態是否正確的變數,"true"代表檢查全部通過;"false"代表檢查不通過
                #$result[$shouldBtCheckedVarName]["varExist"],所檢查的變數是否存在,"false"代表不存在;"true"代表存在
                #$result[$shouldBtCheckedVarName]["varType"],所檢查的變數型態是否正確,"false"代表錯誤;"true"代表正確
                #$result[$shouldBtCheckedVarName]["error"],每個參數設定的錯誤訊息
                #$result["argu"],字串陣列,目前輸入的參數名稱陣列.
                #$result["legalVarName"],字串陣列,合法可用的參數名稱陣列.
                #$result["notNeedVar"],字串陣列,多餘的參數名稱.
                #必填寫的參數:
                #$conf["varInput"],陣列變數,要檢查的陣列變數,請在要檢查的參數前面加上&,這樣變動的結果才能被套用。
                $conf["variableCheck::checkArguments"]["varInput"]=&$conf;
                #$conf["mustBeFilledVariableName"],爲必填參數的變數名稱陣列,形態爲陣列變數,例如: $conf["mustBeFilledVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableName"]=array("delayDays");
                #$conf["mustBeFilledVariableType"],爲必填參數的變數陣列應該爲何種變數形態,形態爲陣列 例如: $conf["mustBeFilledVariableType"] = array("string",integer,"double"); 
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableType"]=array("string");
                #$conf["referenceVarKey"],字串,$conf參數後面的key值,用於移除不要的參考陣列.
                $conf["variableCheck::checkArguments"]["referenceVarKey"]="variableCheck::checkArguments";
                #可以省略的參數:
                #$conf["skipableVariableCanNotBeEmpty"],字串陣列,哪些可省略參數不可以為空字串或集合.
                #$conf["variableCheck::checkArguments"]["skipableVariableCanNotBeEmpty"]=array("startTime","timeZone");
                #$conf["canBeEmptyString"],必填變數內容如果是空字串就不能算是有設置的話,請設為"false",預設爲"true"。
                #$conf["variableCheck::checkArguments"]["canBeEmptyString"]="false";
                #$conf["skipableVariableName"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableName"] = array("id","account","password");
                #$conf["variableCheck::checkArguments"]["skipableVariableName"]=array("startTime","timeZone");
                #$conf["skipableVariableType"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableType"] = array("string",integer,"double"); 
                #$conf["variableCheck::checkArguments"]["skipableVariableType"]=array("string","string");
                #$conf["skipableVarDefaultValue"],字串陣列,每個不存在的可省略變數要初始化為什麼,null與代表不指定,若預設值是必填參數之一,請將$conf["mustBeFilledVar"]改成"\$conf["\mustBeFilledVar\"]".
                #$conf["variableCheck::checkArguments"]["skipableVarDefaultValue"]=array(null,"Asia/Taipei");
                #$conf["arrayCountEqualCheck"],字串陣列,為檢查哪些陣列參數的元素數量要一樣,$conf["arrayCountEqualCheck"][$i]=array()為第$i組key為哪些的變數其元素數量要相等.
                #$conf["arrayCountEqualCheck"][]=array();
                #參考資料來源:
                #array_keys=>http://php.net/manual/en/function.array-keys.php
                $checkResult=variableCheck::checkArguments($conf["variableCheck::checkArguments"]);
                unset($conf["variableCheck::checkArguments"]);
                
                #如果檢查失敗
                if($checkResult["status"]=="false"){
                        
                        #設置執行失敗的訊息
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #如果檢查不通過
                if($checkResult["passed"]=="false"){
                        
                        #設置執行失敗的訊息
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end        
                        
                #函式說明:
                #取得系統時間目前的西元年、月、日、時、分、秒
                #回傳結果:
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$reuslt["error"],執行不正常結束的錯訊息陣列.
                #$result["function"],當前執行的函式名稱.
                #$result["thisWestYear"],當前西元年
                #$result["thisMonth"],當前月份
                #$result["weekDay"],為一個星期的第幾天,0代表第一天(星期日),6代表第七天(星期六)
                #$result["thisDay"],當前日
                #$result["thisHour"],當前小時
                #$result["thisMin"],當前分鐘
                #$result["thisSec"],當前秒數
                #必填的參數
                $conf["time"]["getSystemDateAndTime"]["timeZone"]="Asia/Taipei";#時區代號,可以設定的時區列表:http://www.php.net/manual/en/timezones.php
                $thisTime=time::getSystemDateAndTime($conf["time"]["getSystemDateAndTime"]);
                unset($conf["time"]["getSystemDateAndTime"]);
                        
                #如果取得系統時間失敗
                if($thisTime["status"]=="false"){
                        
                        #設置執行失敗的訊息
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$thisTime;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                        
                #建立 date 變數
                $date=date_create($thisTime["thisWestYear"]."-".$thisTime["thisMonth"]."-".$thisTime["thisDay"]);
                        
                #延後的日期節果
                $modifyed=date_add($date, date_interval_create_from_date_string($conf["delayDays"]." days"));
                        
                #設定輸出的格式
                $modifyedDate=date_format($modifyed,'Y m d');
                                                        
                #取得延後的年月日
                #函式說明:
                #將固定格式的字串分開,並回傳分開的結果。
                #回傳的參數:
                #$result["oriStr"],要分割的原始字串內容
                #$result["dataArray"],爲分割好字串的陣列內容,$result["dataArray"][$i]爲第($i+1)段的內容。
                #$result["dataCounts"],爲總共分成幾段
                #必填參數:
                $conf["stringProcess"]["spiltString"]["stringIn"]=$modifyedDate;#要處理的字串。
                $conf["stringProcess"]["spiltString"]["spiltSymbol"]=" ";#爲以哪個符號作爲分割
                $spiltStr=stringProcess::spiltString($conf["stringProcess"]["spiltString"]);
                unset($conf["stringProcess"]["spiltString"]);
                        
                #如果分割字串失敗
                if($spiltStr["status"]=="false"){
                        
                        #設置執行失敗的訊息
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$spiltStr;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #如果分割出來沒有3段
                if($spiltStr["dataCounts"]>3){
                        
                        #設置執行失敗的訊息
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$spiltStr;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end        
                        
                #取得修改後的年月份
                $result["year"]=$spiltStr["dataArray"][0];
                $result["month"]=$spiltStr["dataArray"][1];
                $result["day"]=$spiltStr["dataArray"][2];
                
                #將數字字串轉換成實際的數字
                #回傳結果:
                #$result["status"],執行成功與否,若爲"true",代表執行成功,若爲"false"代表執失敗。
                #$result["error"],錯誤訊息陣列.
                #$result["function"],當前執行的函數名稱.
                #$result["content"],實際的數字.
                #$result["ori"],未轉換的內容.
                #必填參數:
                #$conf["stringIn"],字串,要處理度數字字串。
                $conf["stringProcess::stringIntToInt"]["stringIn"]=$result["month"];
                #參考資料:
                #http://www.phpf1.com/tutorial/php-string-to-int.html
                $stringIntToInt=stringProcess::stringIntToInt($conf["stringProcess::stringIntToInt"]);
                unset($conf["stringProcess::stringIntToInt"]);
                        
                #如果分割字串失敗
                if($stringIntToInt["status"]=="false"){
                        
                        #設置執行失敗的訊息
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$spiltStr;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                        
                #取得轉換好的數字                               
                $result["month"]=$stringIntToInt["content"];    
                        
                #將數字字串轉換成實際的數字
                #回傳結果:
                #$result,爲實際的數字。
                #必填參數:
                $conf["stringProcess"]["stringIntToInt"]["stringIn"]=$result["day"];#要處理度數字字串。
                $stringIntToInt=stringProcess::stringIntToInt($conf["stringProcess"]["stringIntToInt"]);
                unset($conf["stringProcess"]["stringIntToInt"]);
                        
                #如果分割字串失敗
                if($stringIntToInt["status"]=="false"){
                        
                        #設置執行失敗的訊息
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$spiltStr;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #取得轉換好的日數字                            
                $result["day"]=$stringIntToInt["content"];      
                        
                #執行到這邊代表執行正確
                $result["status"]="true";
                        
                #回傳結果
                return $result;
                                                         
                }#function addTime end

        /*
        #函式說明:
        #計算指定的西元年2月是否為閏月,計算2月份有幾天
        #回傳結果:
        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
        #$result["error"],錯誤訊息陣列
        #$result["function"],當前執行的函數名稱.
        #$result["content"],"28"代表非閏月,"29"代表閏月.
        #必填參數:
        #$conf["year"],字串,要求算2月份有幾天的年份.
        $conf["year"]="2000";
        #可省略參數:
        #無.
        #參考資料:
        #無.
        #備註:
        #無.
        */
        public static function computeFebDays(&$conf){
                
                #初始化要回傳的結果
                $result=array();
                
                #設置當其函數名稱
                $result["function"]=__FUNCTION__;
                
                #如果 $conf 不為陣列
                if(gettype($conf)!="array"){
                        
                        #設置執行失敗
                        $result["status"]="false";
                        
                        #設置執行錯誤訊息
                        $result["error"][]="\$conf變數須為陣列形態";

                        #如果傳入的參數為 null
                        if($conf==null){
                                
                                #設置執行錯誤訊息
                                $result["error"][]="\$conf變數不得為null,請檢查函數「".$result["function"]."」的參數設置有無正確!";
                                
                                }#if end

                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #檢查參數
                #函式說明:
                #檢查必填與可省略的參數,可省略參數可指定預設要給與什麼數值內容。
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$reuslt["error"],執行不正常結束的錯訊息陣列.
                #$result["function"],當前執行的函式名稱.
                #$result["passed"],識別要檢查的全體變數是否存在以及型態是否正確的變數,"true"代表檢查全部通過;"false"代表檢查不通過
                #$result[$shouldBtCheckedVarName]["varExist"],所檢查的變數是否存在,"false"代表不存在;"true"代表存在
                #$result[$shouldBtCheckedVarName]["varType"],所檢查的變數型態是否正確,"false"代表錯誤;"true"代表正確
                #$result[$shouldBtCheckedVarName]["error"],每個參數設定的錯誤訊息
                #$result["argu"],字串陣列,目前輸入的參數名稱陣列.
                #$result["legalVarName"],字串陣列,合法可用的參數名稱陣列.
                #$result["notNeedVar"],字串陣列,多餘的參數名稱.
                #必填寫的參數:
                #$conf["varInput"],陣列變數,要檢查的陣列變數,請在要檢查的參數前面加上&,這樣變動的結果才能被套用。
                $conf["variableCheck::checkArguments"]["varInput"]=&$conf;
                #$conf["mustBeFilledVariableName"],爲必填參數的變數名稱陣列,形態爲陣列變數,例如: $conf["mustBeFilledVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableName"]=array("year");
                #$conf["mustBeFilledVariableType"],爲必填參數的變數陣列應該爲何種變數形態,形態爲陣列 例如: $conf["mustBeFilledVariableType"] = array("string",integer,"double"); 
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableType"]=array("string");
                #$conf["referenceVarKey"],字串,$conf參數後面的key值,用於移除不要的參考陣列.
                $conf["variableCheck::checkArguments"]["referenceVarKey"]="variableCheck::checkArguments";
                #可以省略的參數:
                #$conf["skipableVariableCanNotBeEmpty"],字串陣列,哪些可省略參數不可以為空字串或集合.
                #$conf["variableCheck::checkArguments"]["skipableVariableCanNotBeEmpty"]=array("startTime","timeZone");
                #$conf["canBeEmptyString"],必填變數內容如果是空字串就不能算是有設置的話,請設為"false",預設爲"true"。
                $conf["variableCheck::checkArguments"]["canBeEmptyString"]="false";
                #$conf["skipableVariableName"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableName"] = array("id","account","password");
                #$conf["variableCheck::checkArguments"]["skipableVariableName"]=array("startTime","timeZone");
                #$conf["skipableVariableType"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableType"] = array("string",integer,"double"); 
                #$conf["variableCheck::checkArguments"]["skipableVariableType"]=array("string","string");
                #$conf["skipableVarDefaultValue"],字串陣列,每個不存在的可省略變數要初始化為什麼,null與代表不指定,若預設值是必填參數之一,請將$conf["mustBeFilledVar"]改成"\$conf["\mustBeFilledVar\"]".
                #$conf["variableCheck::checkArguments"]["skipableVarDefaultValue"]=array(null,"Asia/Taipei");
                #$conf["arrayCountEqualCheck"],字串陣列,為檢查哪些陣列參數的元素數量要一樣,$conf["arrayCountEqualCheck"][$i]=array()為第$i組key為哪些的變數其元素數量要相等.
                #$conf["arrayCountEqualCheck"][]=array();
                #參考資料來源:
                #array_keys=>http://php.net/manual/en/function.array-keys.php
                $checkResult=variableCheck::checkArguments($conf["variableCheck::checkArguments"]);
                unset($conf["variableCheck::checkArguments"]);
                
                #如果檢查失敗
                if($checkResult["status"]=="false"){
                        
                        #設置執行失敗的訊息
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #如果檢查不通過
                if($checkResult["passed"]=="false"){
                        
                        #設置執行失敗的訊息
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #預設為"28"非閏月
                $result["content"]="28";
                
                #如果 $conf["year"]爲4的倍數
                if($conf["year"]%4==0){
                        
                        #該年爲潤年,因此2月份爲29天
                        $result["content"]="29";
                        
                        #如果 $conf["year"] 爲100的倍數
                        if($conf["year"] %100==0){
                                
                                #百年不潤因此2月份爲28天
                                $result["content"]="28";
                                
                                #如果 $conf["year"] 爲400的倍數
                                if($conf["year"]%400==0){
                                        
                                        #四百年潤因此2月份爲29天
                                        $result["content"]="29";
                                        
                                        }#if end
                                
                                }#if end
                                
                        }#if end
                
                #執行到這邊代表執行成功
                $result["status"]="true";
                
                #回傳結果
                return $result;
                
                }#function computeFebDays end

        /*
        #函式說明:
        #計算特定年月日為星期幾
        #回傳結果:
        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
        #$result["error"],錯誤訊息陣列
        #$result["function"],當前執行的函數名稱.
        #$result["content"],0~6,依序代表星期天到星期六.
        #必填參數:
        #$conf["year"],字串,要求算該日為星期幾的所屬年份.
        $conf["year"]="2014";
        #$conf["month"],字串,要求算該日為星期幾的所屬月份.
        $conf["month"]="08";
        #$conf["day"],字串,要求算該日為星期幾的日.
        $conf["day"]="03";
        #可省略參數:
        #無.
        #參考資料:
        #無.
        #備註:
        #無.
        */
        public static function computeWeekNumber(&$conf){
                
                #初始化要回傳的結果
                $result=array();
                
                #設置當其函數名稱
                $result["function"]=__FUNCTION__;
                
                #如果 $conf 不為陣列
                if(gettype($conf)!="array"){
                        
                        #設置執行失敗
                        $result["status"]="false";
                        
                        #設置執行錯誤訊息
                        $result["error"][]="\$conf變數須為陣列形態";

                        #如果傳入的參數為 null
                        if($conf==null){
                                
                                #設置執行錯誤訊息
                                $result["error"][]="\$conf變數不得為null,請檢查函數「".$result["function"]."」的參數設置有無正確!";
                                
                                }#if end

                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #檢查參數
                #函式說明:
                #檢查必填與可省略的參數,可省略參數可指定預設要給與什麼數值內容。
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$reuslt["error"],執行不正常結束的錯訊息陣列.
                #$result["function"],當前執行的函式名稱.
                #$result["passed"],識別要檢查的全體變數是否存在以及型態是否正確的變數,"true"代表檢查全部通過;"false"代表檢查不通過
                #$result[$shouldBtCheckedVarName]["varExist"],所檢查的變數是否存在,"false"代表不存在;"true"代表存在
                #$result[$shouldBtCheckedVarName]["varType"],所檢查的變數型態是否正確,"false"代表錯誤;"true"代表正確
                #$result[$shouldBtCheckedVarName]["error"],每個參數設定的錯誤訊息
                #$result["argu"],字串陣列,目前輸入的參數名稱陣列.
                #$result["legalVarName"],字串陣列,合法可用的參數名稱陣列.
                #$result["notNeedVar"],字串陣列,多餘的參數名稱.
                #必填寫的參數:
                #$conf["varInput"],陣列變數,要檢查的陣列變數,請在要檢查的參數前面加上&,這樣變動的結果才能被套用。
                $conf["variableCheck::checkArguments"]["varInput"]=&$conf;
                #$conf["mustBeFilledVariableName"],爲必填參數的變數名稱陣列,形態爲陣列變數,例如: $conf["mustBeFilledVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableName"]=array("year","month","day");
                #$conf["mustBeFilledVariableType"],爲必填參數的變數陣列應該爲何種變數形態,形態爲陣列 例如: $conf["mustBeFilledVariableType"] = array("string",integer,"double"); 
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableType"]=array("string","string","string");
                #$conf["referenceVarKey"],字串,$conf參數後面的key值,用於移除不要的參考陣列.
                $conf["variableCheck::checkArguments"]["referenceVarKey"]="variableCheck::checkArguments";
                #可以省略的參數:
                #$conf["skipableVariableCanNotBeEmpty"],字串陣列,哪些可省略參數不可以為空字串或集合.
                #$conf["variableCheck::checkArguments"]["skipableVariableCanNotBeEmpty"]=array("startTime","timeZone");
                #$conf["canBeEmptyString"],必填變數內容如果是空字串就不能算是有設置的話,請設為"false",預設爲"true"。
                $conf["variableCheck::checkArguments"]["canBeEmptyString"]="false";
                #$conf["skipableVariableName"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableName"] = array("id","account","password");
                #$conf["variableCheck::checkArguments"]["skipableVariableName"]=array("startTime","timeZone");
                #$conf["skipableVariableType"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableType"] = array("string",integer,"double"); 
                #$conf["variableCheck::checkArguments"]["skipableVariableType"]=array("string","string");
                #$conf["skipableVarDefaultValue"],字串陣列,每個不存在的可省略變數要初始化為什麼,null與代表不指定,若預設值是必填參數之一,請將$conf["mustBeFilledVar"]改成"\$conf["\mustBeFilledVar\"]".
                #$conf["variableCheck::checkArguments"]["skipableVarDefaultValue"]=array(null,"Asia/Taipei");
                #$conf["arrayCountEqualCheck"],字串陣列,為檢查哪些陣列參數的元素數量要一樣,$conf["arrayCountEqualCheck"][$i]=array()為第$i組key為哪些的變數其元素數量要相等.
                #$conf["arrayCountEqualCheck"][]=array();
                #參考資料來源:
                #array_keys=>http://php.net/manual/en/function.array-keys.php
                $checkResult=variableCheck::checkArguments($conf["variableCheck::checkArguments"]);
                unset($conf["variableCheck::checkArguments"]);
                
                #如果檢查失敗
                if($checkResult["status"]=="false"){
                        
                        #設置執行失敗的訊息
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #如果檢查不通過
                if($checkResult["passed"]=="false"){
                        
                        #設置執行失敗的訊息
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #合併年月日
                $westDate=$conf["year"].$conf["month"].$conf["day"];
                
                #執行系統命令取得今日星期幾 
                #函式說明:
                #呼叫shell執行系統命令,並取得回傳的內容.
                #回傳結果:
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$result["error"],錯誤訊息陣列.
                #$result["function"],當前執行的函數名稱.
                #$result["argu"],使用的參數.
                #$result["cmd"],執行的指令內容.
                #$result["fullCmd"],如果參數 $conf["inBackGround"] 為 "true" 則會回傳該值.
                #$result["output"],爲執行完二元碼後的輸出陣列,若 $conf["inBackGround"] 為 "true",則為當下的輸出.
                #$result["tmpFileOutput"],儲存輸出的暫存檔案名稱,若 $conf["inBackGround"] 為 "true" 則會回傳該值.
                #$result["running"],是否還在執行.
                #$result["pid"],pid.
                #$result["statusCode"],執行結束後的代碼.
                #$result["escape"],陣列,儲存出新排序過且已經escape過的指令(key為"cmd")與參數(key為"argu").
                #必填參數:
                #$conf["command"],字串,要執行的指令.
                $conf["external"]["callShell"]["command"]="date";
                #$conf["fileArgu"],字串,變數__FILE__的內容.
                $conf["external"]["callShell"]["fileArgu"]=__FILE__;
                #可省略參數:
                #$conf["argu"],陣列字串,指令搭配的參數,預設為空陣列.
                $conf["external"]["callShell"]["argu"]=array("-d",$westDate,"+%w");
                #$conf["arguIsAddr"],陣列字串,指令搭配的哪些參數為路徑,為路徑的參數會進行轉換以便符合呼叫當前函數的位置,預設不指定,若有3個參數,其中第3個參數為路徑,則表示為array("false","false","true").
                #$conf["arguIsAddr"]=array();
                #$conf["pre"],陣列,要在本指令前執行的每個指令與參數.
                #$conf["pre"][$i]["cmd"],字串,要在本指令前執行的第$i+1個指令.
                #$conf["pre"][$i]["param"],陣列字串,要在本指令前執行的第$i+1個指令的參數.
                #$conf["enablePrintDescription"],字串,是否要印出$conf["printDescription"]的內容,"true"代表要,"false"代表不要,預設為"false".
                #$conf["enablePrintDescription"]="true";
                #$conf["printDescription"],字串,執行該外部程式前要印出來的的文字,預設為$conf["command"]的內容加上使用的$conf["argu"]參數.
                #$conf["printDescription"]="";
                #$conf["escapeshellarg"],字串,是否要啟用過濾參數,用了比較安全,但可能會出錯,"true"為啟用,"false"為不啟用,預設為"false".如果參數為"< 、<< 、> 、>> 、| 、2>&1"之一則不會過濾.
                $conf["external"]["callShell"]["escapeshellarg"]="true";
                #$conf["thereIsShellVar"],陣列字串,指令搭配的參數"argu",若含有「\'」,則取代為「"」.每個argu參數都要有對應的元素."true"代表要置換.
                #$conf["thereIsShellVar"]=array();
                #$conf["username"],字串,要用什麼使用者來執行,預設為執行php的使用者,該參數不適用於apache環境.
                #$conf["username"]="";
                #$conf["password"],字串,root的使用者密碼,預設不使用密碼,該參數不適用於apache環境.
                #$conf["password"]="";
                #$conf["useScript"],字串,是否要啟用Linux的script指令來記錄輸出,"true"代表要,Fedora的selinux會擋住該操作;"false"代表不要,預設為"false".
                #$conf["useScript"]="";
                #$conf["logFilePath"],字串,當 $conf["useScript"] 為 "true" 時,輸出的內容要暫存到哪裡,預設為 "/tmp/.qbpwcf_tmp/external/callShell/".
                #$conf["logFilePath"]=".qbpwcf_tmp/external/callShell/";
                #$conf["inBackGround"],字串,是否要在背景執行,且不會等待程式執行結束再執行下一個指令,"true"代表是,"false"代表不要,預設為"false",如果$conf["command"]有用「;」區隔的多個指令將會出錯.
                #$conf["inBackGround"]="";
                #$conf["getErr"],字串,"true"代表將錯誤輸出變成標準輸出,反之"false"為不變動.
                #$conf["getErr"]="false";
                #$conf["doNotRun"],字串,"true"代表不執行指令,預設為"false"會執行指令.
                #$conf["doNotRun"]="false";
                #參考資料:
                #exec=>http://php.net/manual/en/function.exec.php
                #escapeshellcmd=>http://php.net/manual/en/function.escapeshellcmd.php
                #escapeshellarg=>http://php.net/manual/en/function.escapeshellarg.php
                #備註:
                #不是所有指令都能用apache的身份執行,目前已知java,javac指令無法執行,使用root身份可能會被selinux阻擋.
                #若使用的 command、argu 參數,含有 ~ 則會被視為字串,若有需要其於 shell 中代表的家目錄位置,可用 fileAccess::tildeToPath 來進行轉換.
                $execResult=external::callShell($conf["external"]["callShell"]);
                
                #如果 $execResult["status"] 等於 "false"
                if($execResult["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$execResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #取得week數字
                $result["content"]=$execResult["output"][0];
                
                #設置執行成功的識別
                $result["status"]="true";
                
                #回傳結果
                return $result;
                
                }#function computeFebDays end
                
        /*
        #函式說明:
        #php內建的date()函數
        #回傳結果:
        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
        #$result["error"],錯誤訊息陣列.
        #$result["content"],自釘格式的時間字串.
        #必填參數:
        #$conf["timeZone"],字串,時區代號,可以設定的時區列表=> http://www.php.net/manual/en/timezones.php 台灣則為"Asia/Taipei".
        $conf["timeZone"]="Asia/Taipei";
        #$conf["format"],字串,要顯示哪些時間單位,格式與順序為何?西元年為'Y',月份為'm',日為'd',星期為D,以24計的時為'G'以12計的時為'h',分為'i',秒為's',當年的第幾個禮拜為'W',時區為'e',當年第幾天為'z',若想顯示英文字請輸入"\字母".
        $conf["format"]="Y/m/d(星期D) G:i:s 第W周 時區:e";
        #可省略參數:
        #無.
        #參考資料:
        #http://php.net/manual/en/function.date.php
        #備註:
        #無.
        */
        public static function buildInDate(&$conf){

                #初始化要回傳的內容
                $result=array();

                #取得當前執行的函數名稱
                $result["function"]=__FUNCTION__;

                #如果 $conf 不為陣列
                if(gettype($conf)!="array"){
                        
                        #設置執行失敗
                        $result["status"]="false";
                        
                        #設置執行錯誤訊息
                        $result["error"][]="\$conf變數須為陣列形態";

                        #如果傳入的參數為 null
                        if($conf==null){
                                
                                #設置執行錯誤訊息
                                $result["error"][]="\$conf變數不得為null,請檢查函數「".$result["function"]."」的參數設置有無正確!";
                                
                                }#if end

                        #回傳結果
                        return $result;
                        
                        }#if end

                #檢查參數
                #函式說明:
                #檢查必填與可省略的參數,可省略參數可指定預設要給與什麼數值內容。
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$reuslt["error"],執行不正常結束的錯訊息陣列.
                #$result["function"],當前執行的函式名稱.
                #$result["passed"],識別要檢查的全體變數是否存在以及型態是否正確的變數,"true"代表檢查全部通過;"false"代表檢查不通過
                #$result[$shouldBtCheckedVarName]["varExist"],所檢查的變數是否存在,"false"代表不存在;"true"代表存在
                #$result[$shouldBtCheckedVarName]["varType"],所檢查的變數型態是否正確,"false"代表錯誤;"true"代表正確
                #$result[$shouldBtCheckedVarName]["error"],每個參數設定的錯誤訊息
                #$result["argu"],字串陣列,目前輸入的參數名稱陣列.
                #$result["legalVarName"],字串陣列,合法可用的參數名稱陣列.
                #$result["notNeedVar"],字串陣列,多餘的參數名稱.
                #必填寫的參數:
                #$conf["varInput"],陣列變數,要檢查的陣列變數,請在要檢查的參數前面加上&,這樣變動的結果才能被套用。
                $conf["variableCheck::checkArguments"]["varInput"]=&$conf;
                #$conf["mustBeFilledVariableName"],爲必填參數的變數名稱陣列,形態爲陣列變數,元素數量需要跟"mustBeFilledVariableType"參數的元素數量一致,例如: $conf["mustBeFilledVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableName"]=array("timeZone","format");
                #$conf["mustBeFilledVariableType"],爲必填參數的變數陣列應該爲何種變數形態,形態爲陣列,元素數量需要跟"mustBeFilledVariableName"參數的元素數量一致,例如: $conf["mustBeFilledVariableType"] = array("string",integer,"double","resource","object"); 
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableType"]=array("string","string");
                #$conf["referenceVarKey"],字串,$conf參數後面的key值,用於移除不要的參考陣列.
                $conf["variableCheck::checkArguments"]["referenceVarKey"]="variableCheck::checkArguments";
                #可以省略的參數:
                #$conf["canBeEmptyString"],必填變數內容如果是空字串就不能算是有設置的話,請設為"false",預設爲"true",可以為空字串.
                $conf["variableCheck::checkArguments"]["canBeEmptyString"]="false";
                #$conf["skipableVariableName"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableName"] = array("id","account","password");
                #$conf["variableCheck::checkArguments"]["skipableVariableName"]=array("wordsLong");
                #$conf["skipableVariableType"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableType"] = array("string",integer,"double"); 
                #$conf["variableCheck::checkArguments"]["skipableVariableType"]=array("string");
                #$conf["skipableVarDefaultValue"],字串陣列,每個不存在的可省略變數要初始化為什麼,null與代表不指定,若預設值是參數之一,請將$conf["mustBeFilledVar"]改成"\$conf["\mustBeFilledVar\"]".
                #$conf["variableCheck::checkArguments"]["skipableVarDefaultValue"]=array(null);
                #$conf["arrayCountEqualCheck"],字串陣列,為檢查哪些陣列參數的元素數量要一樣,$conf["arrayCountEqualCheck"][$i]=array()為第$i組key為哪些的變數其元素數量要相等.
                #$conf["arrayCountEqualCheck"][]=array();
                #參考資料來源:
                #array_keys=>http://php.net/manual/en/function.array-keys.php
                $checkResult=variableCheck::checkArguments($conf["variableCheck::checkArguments"]);
                unset($conf["variableCheck::checkArguments"]);

                #如果檢查有誤
                if($checkResult["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #如果檢查不通過
                if($checkResult["passed"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkResult;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end

                #設定時區
                $conf_setTimeZone["timeZone"]=$conf["timeZone"];
                time::setTimeZone($conf_setTimeZone);
                unset($conf_setTimeZone);

                #取得時間
                $thisTime=date($conf["format"]);

                #如果取得時間失敗
                if($thisTime==false){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]="取得時間失敗";
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #設置取得的時間
                $result["content"]=$thisTime;
                        
                #設置執行正常
                $result["status"]="true";

                #回傳結果
                return $result;

                }#function buildInDate end

        /*
        #函式說明:
        #取得當前系統支援的時區
        #回傳結果:
        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
        #$result["error"],錯誤訊息陣列.
        #$result["function"],當前執行的函數名稱.
        #$result["content"]["timezone"][M]["name"],第M+1個區域的名稱.
        #$result["content"]["timezone"][M]["dst"],第M+1個區域是否有用日光節約時間,true代表有;false代表沒有.
        #$result["content"]["timezone"][M]["offset"]第M+1個區域資料的時差.
        #$result["content"]["offsets"],存在的offset.
        #必填參數:
        #無.
        #可省略參數:
        #$conf["strHead"],字串,時區前面的字串,預設為"UTC".
        #$conf["strHead"]="UTC";
        #參考資料:
        #-12的時區來源=>http://php.net/manual/en/timezones.others.php
        #備註:
        #建構中...
        */
        public static function getPhpSupportedTimezone(&$conf){
                
                #初始化要回傳的結果
                $result=array();

                #取得當前執行的函數名稱
                $result["function"]=__FUNCTION__;

                #取得參數
                $result["argu"]=$conf;

                #如果 $conf 不為陣列
                if(gettype($conf)!="array"){
                
                        #設置執行失敗
                        $result["status"]="false";
                
                        #設置執行錯誤訊息
                        $result["error"][]="\$conf變數須為陣列形態";
                
                        #如果傳入的參數為 null
                        if($conf==null){
                        
                                #設置執行錯誤訊息
                                $result["error"][]="\$conf變數不得為null,請檢查函數「".$result["function"]."」的參數設置有無正確!";
                        
                                }#if end

                        #回傳結果
                        return $result;
                
                        }#if end
                
                #檢查參數
                #函式說明:
                #檢查必填與可省略的參數,可省略參數可指定預設要給與什麼數值內容。
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$reuslt["error"],執行不正常結束的錯訊息陣列.
                #$result["function"],當前執行的函式名稱.
                #$result["passed"],識別要檢查的全體變數是否存在以及型態是否正確的變數,"true"代表檢查全部通過;"false"代表檢查不通過
                #$result[$shouldBeCheckedVarName]["varExist"],所檢查的變數是否存在,"false"代表不存在;"true"代表存在
                #$result[$shouldBeCheckedVarName]["varType"],所檢查的變數型態是否正確,"false"代表錯誤;"true"代表正確
                #$result[$shouldBeCheckedVarName]["error"],每個參數設定的錯誤訊息
                #$result["shouldNotBeEmpty"],不應該為空字串或控陣列的變數.
                #$result["argu"],字串陣列,目前輸入的參數名稱陣列.
                #$result["legalVarName"],字串陣列,合法可用的參數名稱陣列.
                #$result["notNeedVar"],字串陣列,多餘的參數名稱.
                #必填寫的參數:
                #$conf["varInput"],陣列變數,要檢查的陣列變數,請在要檢查的參數前面加上&,這樣變動的結果才能被套用。
                $conf["variableCheck::checkArguments"]["varInput"]=&$conf;      
                #$conf["referenceVarKey"],字串,$conf參數後面的key值,用於移除不要的參考陣列.
                $conf["variableCheck::checkArguments"]["referenceVarKey"]="variableCheck::checkArguments";
                #可以省略的參數:
                #$conf["mustBeFilledVariableName"],爲必填參數的變數名稱陣列,形態爲陣列變數,元素數量需要跟"mustBeFilledVariableType"參數的元素數量一致,例如: $conf["mustBeFilledVariableName"] = array("id","account","password");
                #$conf["mustBeFilledVariableName"]=array();
                #$conf["mustBeFilledVariableType"],爲必填參數的變數陣列應該爲何種變數形態,形態爲陣列,元素數量需要跟"mustBeFilledVariableName"參數的元素數量一致,例如: $conf["mustBeFilledVariableType"] = array("string",integer,"double","resource","object"); , null代表不指定變數形態.
                #$conf["mustBeFilledVariableType"]=array();
                #$conf["canBeEmptyString"],字串,必填變數內容如果是空字串就不能算是有設置的話,請設為"false",預設爲"true",可以為空字串.
                #$conf["canBeEmptyString"]="false";
                #$conf["canNotBeEmpty"],字串陣列,哪些必填參數的內容不得為空字串或空陣列,僅當$conf["canBeEmptyString"]為"true"時會生效.
                #$conf["canNotBeEmpty"]=array();
                #$conf["canBeEmpty"],字串陣列,哪些必填參數的內容可為空字串或空陣列,僅當$conf["canBeEmptyString"]為"false"時會生效.
                #$conf["canBeEmpty"]=array();
                #$conf["skipableVariableCanNotBeEmpty"],字串陣列,哪些可省略參數不可以為空字串或空陣列.
                #$conf["variableCheck::checkArguments"]["skipableVariableCanNotBeEmpty"]=array("strHead");
                #$conf["skipableVariableName"],陣列字串,爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["skipableVariableName"]=array("strHead");
                #$conf["skipableVariableType"],陣列字串,爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableType"] = array("string",integer,"double"); 
                $conf["variableCheck::checkArguments"]["skipableVariableType"]=array("string");
                #$conf["skipableVarDefaultValue"],字串陣列,每個不存在的可省略變數要初始化為什麼,null與代表不指定,若預設值是參數之一,請將$conf["mustBeFilledVar"]改成"\$conf["\mustBeFilledVar\"]".
                $conf["variableCheck::checkArguments"]["skipableVarDefaultValue"]=array("UTC");
                #$conf["disallowAllSkipableVarIsEmpty"],字串,是否允許每個可省略參數都為空字串,預設為"true"允許,反之為"false".
                #$conf["disallowAllSkipableVarIsEmpty"]="";
                #$conf["disallowAllSkipableVarIsEmptyArray"],字串,是否允許每個可省略參數都為空陣列,預設為"true"允許,反之為"false".
                #$conf["disallowAllSkipableVarIsEmptyArray"]="";
                #$conf["arrayCountEqualCheck"],字串陣列,為檢查哪些陣列參數的元素數量要一樣,$conf["arrayCountEqualCheck"][$i]=array()為第$i組key為哪些的變數其元素數量要相等.
                #$conf["arrayCountEqualCheck"][]=array();
                #參考資料來源:
                #array_keys=>http://php.net/manual/en/function.array-keys.php
                $checkArguments=variableCheck::checkArguments($conf["variableCheck::checkArguments"]);
                unset($conf["variableCheck::checkArguments"]);
                
                #如果執行失敗
                if($checkArguments["status"]==="false"){
                        
                        #設置執行失敗
                        $result["status"]="false";
                        
                        #設置執行失敗
                        $result["error"]=$checkArguments;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                        
                #如果檢查不通過
                if($checkArguments["passed"]==="false"){
                        
                        #設置執行失敗
                        $result["status"]="false";
                        
                        #設置執行失敗
                        $result["error"]=$checkArguments;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                
                $offsetArrays=array();
                $timezone=array();
                foreach(timezone_abbreviations_list() as $tzs){
                        
                        foreach($tzs as $tz){
                                
                                #沒有日光節約時間資訊的時區
                                if(!isset($tz["dst"])){
                                        
                                        #就視為不使用
                                        $tz["dst"]=false;
                                
                                        }
                                                        
                                #跳過沒有timezone id資訊的時區
                                if(!isset($tz["timezone_id"])){
                                        
                                        switch($tz["offset"]){
                                                
                                                case -43200:
                                                        $tz["timezone_id"]="Etc/GMT+12";
                                                        $tz["dst"]=false;
                                                        break;
                                        
                                                default:
                                                        continue 2;
                                                }                               
                                        }
                                
                                #計算正確的時區offset
                                $defaultTimeZone=date_default_timezone_get(); #取得系統設定的時區
                                date_default_timezone_set('UTC');
                                $utcTime=strtotime('2017-06-06 12:00:00');
                                date_default_timezone_set($tz["timezone_id"]);                  
                                $hasDST=date('I',$utcTime);             
                                
                                #有用日光節約時間要再多減少一小時.
                                if($hasDST==="1"){
                                        $gmdate=gmdate('Y-m-d H:i:s',$utcTime);
                                        $date=date('Y-m-d H:i:s',$utcTime-3600);                                
                                        }
                                else{
                                        $gmdate=gmdate('Y-m-d H:i:s',$utcTime);
                                        $date=date('Y-m-d H:i:s',$utcTime);
                                        }
                                date_default_timezone_set("UTC");
                                (float)$offsetHour=(strtotime($date)-strtotime($gmdate))/3600.0;
                                
                                #還原成系統設定的時區
                                date_default_timezone_set($defaultTimeZone);
                                                        
                                #驗證時區的日光節約時間設定是對的
                                date_default_timezone_set('UTC');
                                $utcTime=strtotime('2017-07-06 12:00:00');
                                date_default_timezone_set($tz["timezone_id"]);
                                $dst=date('I',$utcTime);
                                
                                #修正有無使用日光節約時間
                                if($dst==="1" && $tz["dst"]===false){
                                        
                                        $tz["dst"]=true;
                                        
                                        }
                                else if($dst==="0" && $tz["dst"]===true){
                                        
                                        $tz["dst"]=false;
                                
                                        }
                                
                                #將時區變成 $UTC-12 ~ $UTC+0 ~ $UTC+12
                                if($offsetHour>=0){
                                        
                                        $offsetHour="+".$offsetHour;                            
                                
                                        }
                                        
                                $offsetHour=$conf["strHead"].$offsetHour;
                                
                                if(!isset($tz["timezone_id"])){
                                        
                                        continue;
                                        
                                        }
                                else if($tz["timezone_id"]===null){
                                        
                                        continue;
                        
                                        }
                                
                                $name=$tz["timezone_id"];
                                
                                $timezone[]=array('name'=>$name,'dst'=>$tz["dst"],'offset'=>(string)$offsetHour);
                                if(!in_array($offsetHour,$offsetArrays)){
                                        
                                        $offsetArrays[]=$offsetHour;
                                        
                                        }       
                                
                                }
                                
                        }#foreach end   
                        
                #設置要回傳的內容
                $result["content"]=array("timezone"=>$timezone,"offsets"=>$offsetArrays);       
                
                #設置執行正常
                $result["status"]="true";
                
                #回傳結果 
                return $result;
                
                }#function getPhpSupportedTimezone end

        /*
        #函式說明:
        #含時間單位的運算,目前支援小時跟分鐘的加總運算,運算結果單位為小時.
        #回傳結果:
        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
        #$result["error"],錯誤訊息陣列.
        #$result["function"],當前執行的函數名稱.
        #$result["argu"],使用的參數.
        #$result["content"][H],運作結果,以小時為單位表示.
        #$result["content"][M],運作結果,以分鐘為單位表示.
        #$result["content"][HM],運作結果,用Xh Ymin表示.
        #必填參數:
        #$conf["input"],字串,含時間單位的運算.
        $conf["input"]="";
        #可省略參數:
        #無.
        #參考資料:
        #無.
        #備註:
        #可用於處理這樣的運算 1h+38min+2min+2min+5min+13min+2min+1min+8min+3min+4min+7min+10min+13min+4min+19min+2min+2min+12min+3min+2min+1min+3min+15min+25min+5min+2min+3min+3min+9min+2min+4min+6min+3min+13min+13min+6min+4min+2min+3min+1min+17min+4min+3min+11min+3min+8min+4min+2min+4min+7min+4min+4min+2min+2min+12min+10min+8min+2min+2min+3min+40min+3min+1h 28min
        */
        public static function caculate(&$conf){
        
                #初始化要回傳的內容
                $result=array();
                
                #取得當前函數名稱
                $result["function"]=__FUNCTION__;
                
                #如果 $conf 不為陣列
                if(gettype($conf)!="array"){
                        
                        #設置執行失敗
                        $result["status"]="false";
                        
                        #設置執行錯誤訊息
                        $result["error"][]="\$conf變數須為陣列形態";

                        #如果傳入的參數為 null
                        if($conf==null){
                                
                                #設置執行錯誤訊息
                                $result["error"][]="\$conf變數不得為null,請檢查函數「".$result["function"]."」的參數設置有無正確!";
                                
                                }#if end

                        #回傳結果
                        return $result;
                        
                        }#if end
                        
                #取得參數
                $result["argu"]=$conf;
                
                #函式說明:
                #檢查必填與可省略的參數,可省略參數可指定預設要給與什麼數值內容.
                #回傳結果:
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$result["error"],執行不正常結束的錯訊息陣列.
                #$result["simpleError"],簡單表示的錯誤訊息.
                #$result["function"],當前執行的函式名稱.
                #$result["argu"],設置給予的參數.
                #$result["passed"],識別要檢查的全體變數是否存在以及型態是否正確的變數,"true"代表檢查全部通過;"false"代表檢查不通過
                #$result[$shouldBeCheckedVarName]["varExist"],所檢查的變數是否存在,"false"代表不存在;"true"代表存在
                #$result[$shouldBeCheckedVarName]["varType"],所檢查的變數型態是否正確,"false"代表錯誤;"true"代表正確
                #$result[$shouldBeCheckedVarName]["error"],每個參數設定的錯誤訊息
                #$result["shouldNotBeEmpty"],不應該為空字串或控陣列的變數.
                #$result["argu"],字串陣列,目前輸入的參數名稱陣列.
                #$result["legalVarName"],字串陣列,合法可用的參數名稱陣列.
                #$result["notNeedVar"],字串陣列,多餘的參數名稱.
                #必填參數:
                #$conf["varInput"],陣列變數,要檢查的陣列變數,請在要檢查的參數前面加上&,這樣變動的結果才能被套用。
                $conf["variableCheck::checkArguments"]["varInput"]=&$conf;
                #$conf["referenceVarKey"],字串,$conf參數後面的key值,用於移除不要的參考陣列.
                $conf["variableCheck::checkArguments"]["referenceVarKey"]="variableCheck::checkArguments";
                #可省略參數:
                #$conf["mustBeFilledVariableName"],爲必填參數的變數名稱陣列,形態爲陣列變數,元素數量需要跟"mustBeFilledVariableType"參數的元素數量一致,例如: $conf["mustBeFilledVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableName"]=array("input");
                #$conf["mustBeFilledVariableType"],爲必填參數的變數陣列應該爲何種變數形態,形態爲陣列,元素數量需要跟"mustBeFilledVariableName"參數的元素數量一致,例如: $conf["mustBeFilledVariableType"] = array("string",integer,"double","resource","object"); , null代表不指定變數形態.
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableType"]=array("string");
                #$conf["canBeEmptyString"],字串,必填變數內容如果是空字串就不能算是有設置的話,請設為"false",預設爲"true",可以為空字串.
                $conf["variableCheck::checkArguments"]["canBeEmptyString"]="false";
                #$conf["canNotBeEmpty"],字串陣列,哪些必填參數的內容不得為空字串或空陣列,僅當$conf["canBeEmptyString"]為"true"時會生效.
                #$conf["canNotBeEmpty"]=array();
                #$conf["canBeEmpty"],字串陣列,哪些必填參數的內容可為空字串或空陣列,僅當$conf["canBeEmptyString"]為"false"時會生效.
                #$conf["canBeEmpty"]=array();
                #$conf["skipableVariableCanNotBeEmpty"],字串陣列,哪些可省略參數不可以為空字串或空陣列.
                #$conf["skipableVariableCanNotBeEmpty"]=array();
                #$conf["skipableVariableName"],陣列字串,爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableName"] = array("id","account","password");
                #$conf["skipableVariableName"]=array();
                #$conf["skipableVariableType"],陣列字串,爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableType"] = array("string",integer,"double");
                #$conf["skipableVariableType"]=array();
                #$conf["skipableVarDefaultValue"],字串陣列,每個不存在的可省略變數要初始化為什麼,null與代表不指定,若預設值是參數之一,請將$conf["mustBeFilledVar"]改成"\$conf["\mustBeFilledVar\"]".
                #$conf["skipableVarDefaultValue"]=array("");
                #$conf["disallowAllSkipableVarIsEmpty"],字串,是否允許每個可省略參數都為空字串,預設為"true"允許,反之為"false".
                #$conf["disallowAllSkipableVarIsEmpty"]="";
                #$conf["disallowAllSkipableVarIsEmptyArray"],字串,是否允許每個可省略參數都為空陣列,預設為"true"允許,反之為"false".
                #$conf["disallowAllSkipableVarIsEmptyArray"]="";
                #$conf["arrayCountEqualCheck"],字串陣列,為檢查哪些陣列參數的元素數量要一樣,$conf["arrayCountEqualCheck"][$i]=array()為第$i組key為哪些的變數其元素數量要相等.
                #$conf["arrayCountEqualCheck"][]=array();
                #參考資料:
                #array_keys=>http://php.net/manual/en/function.array-keys.php
                #備註:
                #無.
                $checkArguments=variableCheck::checkArguments($conf["variableCheck::checkArguments"]);
                unset($conf["variableCheck::checkArguments"]);
        
                #如果檢查參數出錯
                if($checkArguments["status"]==="false"){
                
                        #設置執行不正常
                        $result["status"]="false";

                        #執行到這邊代表檢查通過
                        $result["error"]=$checkArguments;

                        #回傳結果
                        return $result;
                
                        }#if end
                        
                #如果檢查參數不通過
                if($checkArguments["passed"]==="false"){
                
                        #設置執行不正常
                        $result["status"]="false";

                        #執行到這邊代表檢查通過
                        $result["error"]=$checkArguments;

                        #回傳結果
                        return $result;
                
                        }#if end
                        
                #用『+』進行分割
                #函式說明:
                #將固定格式的字串分開,並回傳分開的結果.
                #回傳結果:
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$result["error"],錯誤訊息陣列
                #$result["function"],當前執行的函數名稱.
                #$result["argu"],使用的參數.
                #$result["oriStr"],要分割的原始字串內容
                #$result["dataArray"],爲分割好字串的陣列內容,$result["dataArray"][$i]爲第($i+1)段的內容。
                #$result["dataCounts"],爲總共分成幾段
                #$result["found"],是否有在$conf["stringIn"]找到$conf["spiltSymbol"],"true"代表有找到,"false"代表沒有找到.
                #必填參數:
                #$conf["stringIn"],字串,要處理的字串.
                $conf["stringProcess::spiltString"]["stringIn"]=$conf["input"];
                #$conf["spiltSymbol"],字串,爲以哪個符號作爲分割.
                $conf["stringProcess::spiltString"]["spiltSymbol"]="+";
                #可省略參數:
                #$conf["allowEmptyStr"],是否允許分割出來空字串,預設為"false"不允許;"true"代表允許.
                #$conf["allowEmptyStr"]="false";
                #參考資料:
                #無.
                #備註:
                #無.
                $spiltString=stringProcess::spiltString($conf["stringProcess::spiltString"]);
                unset($conf["stringProcess::spiltString"]);
        
                #如果執行出錯
                if($spiltString["status"]==="false"){
                
                        #設置執行不正常
                        $result["status"]="false";

                        #執行到這邊代表檢查通過
                        $result["error"]=$spiltString;

                        #回傳結果
                        return $result;
                
                        }#if end
                        
                #如果分割出來的段數小於1
                if($spiltString["dataCounts"]<1){
                
                        #設置執行不正常
                        $result["status"]="false";

                        #執行到這邊代表檢查通過
                        $result["error"]=$spiltString;

                        #回傳結果
                        return $result;
                
                        }#if end
                
                #確認每個時間字串是否含有空格
                #函式說明:
                #檢查多個字串中的每個字串是否有多個關鍵字
                #回傳結果:
                #$result["status"],整體來說,執行是否成功,"true"代表執行成功,"false"代表執行失敗。
                #$result["function"],當前執行的函數名稱.
                #$result["error"],錯誤訊息.
                #$result["argu"],使用的參數.
                #$result["foundedTrueKey"],結果為"true"的被搜尋元素key陣列,與其數值內容.
                #$result["foundedKeyWords"],找到的關鍵字.
                #$result["foundedFalseKey"],結果為"false"的被搜尋元素key陣列.
                #$result["foundedTrueKeyWords"],二維陣列,各個字串有找到的關鍵字陣列.
                #$result["foundedAll"],是否每個關鍵字都有找到,"true"代表每個都有找到,"false"代表沒有每個都找到.
                #必填參數:
                #$conf["keyWords"],字串陣列,想要搜尋的關鍵字.
                $conf["search::findManyKeyWordsFromManyString"]["keyWords"]=array(" ");
                #$conf["stringArray"],字串陣列,要被搜尋的字串內容陣列.
                $conf["search::findManyKeyWordsFromManyString"]["stringArray"]=$spiltString["dataArray"];
                #可省略參數:
                #$conf["completeEqual"],字串,是否內容要完全符合,不能多出任何不符合的內容,預設為"false"不需要完全符合.
                #$conf["completeEqual"]="true";
                #參考資料:
                #無.
                #備註:
                #無.
                $findManyKeyWordsFromManyString=search::findManyKeyWordsFromManyString($conf["search::findManyKeyWordsFromManyString"]);
                unset($conf["search::findManyKeyWordsFromManyString"]);
                
                #var_dump($findManyKeyWordsFromManyString);exit;
                
                #如果執行出錯
                if($findManyKeyWordsFromManyString["status"]==="false"){
                
                        #設置執行不正常
                        $result["status"]="false";

                        #執行到這邊代表檢查通過
                        $result["error"]=$findManyKeyWordsFromManyString;

                        #回傳結果
                        return $result;
                
                        }#if end
                        
                #如果含有空格,代表為小時+分鐘
                if(count($findManyKeyWordsFromManyString["foundedTrueKey"])>0){
                
                        #針對每個小時與分鐘字串
                        foreach($findManyKeyWordsFromManyString["foundedTrueKey"] as $index => $hourAndMinStr){
                        
                                #將小時與分鐘分開
                                #函式說明:
                                #將固定格式的字串分開,並回傳分開的結果.
                                #回傳結果:
                                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                                #$result["error"],錯誤訊息陣列
                                #$result["function"],當前執行的函數名稱.
                                #$result["argu"],使用的參數.
                                #$result["oriStr"],要分割的原始字串內容
                                #$result["dataArray"],爲分割好字串的陣列內容,$result["dataArray"][$i]爲第($i+1)段的內容。
                                #$result["dataCounts"],爲總共分成幾段
                                #$result["found"],是否有在$conf["stringIn"]找到$conf["spiltSymbol"],"true"代表有找到,"false"代表沒有找到.
                                #必填參數:
                                #$conf["stringIn"],字串,要處理的字串.
                                $conf["stringProcess::spiltString"]["stringIn"]=$hourAndMinStr;
                                #$conf["spiltSymbol"],字串,爲以哪個符號作爲分割.
                                $conf["stringProcess::spiltString"]["spiltSymbol"]=" ";
                                #可省略參數:
                                #$conf["allowEmptyStr"],是否允許分割出來空字串,預設為"false"不允許;"true"代表允許.
                                #$conf["allowEmptyStr"]="false";
                                #參考資料:
                                #無.
                                #備註:
                                #無.
                                $spiltString_hourAndMinStr=stringProcess::spiltString($conf["stringProcess::spiltString"]);
                                unset($conf["stringProcess::spiltString"]);
                        
                                #如果執行出錯
                                if($spiltString_hourAndMinStr["status"]==="false"){
                                
                                        #設置執行不正常
                                        $result["status"]="false";

                                        #執行到這邊代表檢查通過
                                        $result["error"]=$spiltString_hourAndMinStr;

                                        #回傳結果
                                        return $result;
                                
                                        }#if end
                                        
                                #如果分割出來的段數不為2段
                                if($spiltString_hourAndMinStr["dataCounts"]!==2){
                                
                                        #設置執行不正常
                                        $result["status"]="false";

                                        #執行到這邊代表檢查通過
                                        $result["error"]=$spiltString_hourAndMinStr;

                                        #回傳結果
                                        return $result;
                                
                                        }#if end
                                        
                                #判斷小時是否為 H、h、Hour、hour、Hours、hours 結尾
                                #函式說明:
                                #取得符合多個特定字首與字尾的字串
                                #回傳結果:
                                #$result["status"],若爲"true"則代表執行正常;若爲"false"則代表執行失敗。
                                #$result["function"],當前執行的函數名稱.
                                #$result["error"],錯誤訊息陣列.
                                #$result["founded"],若為"true"則代表有找到符合字首條件的結果;若爲"false"則代表沒有找到。
                                #$result["content"],符合條件的字串,去掉字首字尾後的結果.
                                #$result["returnString"],爲符合字首字、尾條件的字串內容。
                                #$result["argu"],使用的參數.
                                #必填參數:
                                #$conf["checkString"],字串,要檢查的字串.
                                $conf["search::getMeetMultiConditionsString"]["checkString"]=$spiltString_hourAndMinStr["dataArray"][0];
                                #$conf["keyWord"],字串陣列,用來檢查字首、字首應該要有哪些字串之一,每個元素代表一個可能的條件,key為front者代表開頭的關鍵字,key為tail為代表結尾的官關鍵字.
                                $conf["search::getMeetMultiConditionsString"]["keyWord"][]=array("tail"=>"H");
                                $conf["search::getMeetMultiConditionsString"]["keyWord"][]=array("tail"=>"h");
                                $conf["search::getMeetMultiConditionsString"]["keyWord"][]=array("tail"=>"Hour");
                                $conf["search::getMeetMultiConditionsString"]["keyWord"][]=array("tail"=>"hour");
                                $conf["search::getMeetMultiConditionsString"]["keyWord"][]=array("tail"=>"Hours");
                                $conf["search::getMeetMultiConditionsString"]["keyWord"][]=array("tail"=>"hours");
                                #可省略參數:
                                #無.
                                #參考資料:
                                #無.
                                #備註:
                                #無.
                                $getMeetMultiConditionsString=search::getMeetMultiConditionsString($conf["search::getMeetMultiConditionsString"]);
                                unset($conf["search::getMeetMultiConditionsString"]);
                                
                                #如果執行出錯
                                if($getMeetMultiConditionsString["status"]==="false"){
                                
                                        #設置執行不正常
                                        $result["status"]="false";

                                        #執行到這邊代表檢查通過
                                        $result["error"]=$getMeetMultiConditionsString;

                                        #回傳結果
                                        return $result;
                                
                                        }#if end
                                        
                                #如果不是可以解析的時間單位
                                if($getMeetMultiConditionsString["founded"]==="false"){
                                
                                        #設置執行不正常
                                        $result["status"]="false";

                                        #執行到這邊代表檢查通過
                                        $result["error"]=$getMeetMultiConditionsString;

                                        #回傳結果
                                        return $result;
                                
                                        }#if end
                                                                
                                #將小時轉換成分鐘
                                $resultMinFromHour=$getMeetMultiConditionsString["content"]*60;
                                
                                #判斷分鐘是否為 M、m、Min、min、Mins、mins 結尾
                                #函式說明:
                                #取得符合多個特定字首與字尾的字串
                                #回傳結果:
                                #$result["status"],若爲"true"則代表執行正常;若爲"false"則代表執行失敗。
                                #$result["function"],當前執行的函數名稱.
                                #$result["error"],錯誤訊息陣列.
                                #$result["founded"],若為"true"則代表有找到符合字首條件的結果;若爲"false"則代表沒有找到。
                                #$result["content"],符合條件的字串,去掉字首字尾後的結果.
                                #$result["returnString"],爲符合字首字、尾條件的字串內容。
                                #$result["argu"],使用的參數.
                                #必填參數:
                                #$conf["checkString"],字串,要檢查的字串.
                                $conf["search::getMeetMultiConditionsString"]["checkString"]=$spiltString_hourAndMinStr["dataArray"][1];
                                #$conf["keyWord"],字串陣列,用來檢查字首、字首應該要有哪些字串之一,每個元素代表一個可能的條件,key為front者代表開頭的關鍵字,key為tail為代表結尾的官關鍵字.
                                $conf["search::getMeetMultiConditionsString"]["keyWord"][]=array("tail"=>"M");
                                $conf["search::getMeetMultiConditionsString"]["keyWord"][]=array("tail"=>"m");
                                $conf["search::getMeetMultiConditionsString"]["keyWord"][]=array("tail"=>"Min");
                                $conf["search::getMeetMultiConditionsString"]["keyWord"][]=array("tail"=>"min");
                                $conf["search::getMeetMultiConditionsString"]["keyWord"][]=array("tail"=>"Mins");
                                $conf["search::getMeetMultiConditionsString"]["keyWord"][]=array("tail"=>"mins");
                                #可省略參數:
                                #無.
                                #參考資料:
                                #無.
                                #備註:
                                #無.
                                $getMeetMultiConditionsString=search::getMeetMultiConditionsString($conf["search::getMeetMultiConditionsString"]);
                                unset($conf["search::getMeetMultiConditionsString"]);
                                
                                #如果執行出錯
                                if($getMeetMultiConditionsString["status"]==="false"){
                                
                                        #設置執行不正常
                                        $result["status"]="false";

                                        #執行到這邊代表檢查通過
                                        $result["error"]=$getMeetMultiConditionsString;

                                        #回傳結果
                                        return $result;
                                
                                        }#if end
                                        
                                #如果不是可以解析的時間單位
                                if($getMeetMultiConditionsString["founded"]==="false"){
                                
                                        #設置執行不正常
                                        $result["status"]="false";

                                        #執行到這邊代表檢查通過
                                        $result["error"]=$getMeetMultiConditionsString;

                                        #回傳結果
                                        return $result;
                                
                                        }#if end
                                
                                #加總分鐘
                                $resultMin=$resultMinFromHour+$getMeetMultiConditionsString["content"];
                                
                                #更新成用分鐘表示的時間
                                $spiltString["dataArray"][$index]=$resultMin;
                        
                                }#foreach end
                
                        }#if end
                
                #針對每個小時或分鐘字串
                foreach($findManyKeyWordsFromManyString["foundedFalseKey"] as $index => $singleTimeStr){
                
                        #判斷 $singleTimeStr 是否為 H、h、Hour、hour、Hours、hours 結尾
                        #函式說明:
                        #取得符合多個特定字首與字尾的字串
                        #回傳結果:
                        #$result["status"],若爲"true"則代表執行正常;若爲"false"則代表執行失敗。
                        #$result["function"],當前執行的函數名稱.
                        #$result["error"],錯誤訊息陣列.
                        #$result["founded"],若為"true"則代表有找到符合字首條件的結果;若爲"false"則代表沒有找到。
                        #$result["content"],符合條件的字串,去掉字首字尾後的結果.
                        #$result["returnString"],爲符合字首字、尾條件的字串內容。
                        #$result["argu"],使用的參數.
                        #必填參數:
                        #$conf["checkString"],字串,要檢查的字串.
                        $conf["search::getMeetMultiConditionsString"]["checkString"]=$singleTimeStr;
                        #$conf["keyWord"],字串陣列,用來檢查字首、字首應該要有哪些字串之一,每個元素代表一個可能的條件,key為front者代表開頭的關鍵字,key為tail為代表結尾的官關鍵字.
                        $conf["search::getMeetMultiConditionsString"]["keyWord"][]=array("tail"=>"H");
                        $conf["search::getMeetMultiConditionsString"]["keyWord"][]=array("tail"=>"h");
                        $conf["search::getMeetMultiConditionsString"]["keyWord"][]=array("tail"=>"Hour");
                        $conf["search::getMeetMultiConditionsString"]["keyWord"][]=array("tail"=>"hour");
                        $conf["search::getMeetMultiConditionsString"]["keyWord"][]=array("tail"=>"Hours");
                        $conf["search::getMeetMultiConditionsString"]["keyWord"][]=array("tail"=>"hours");
                        #可省略參數:
                        #無.
                        #參考資料:
                        #無.
                        #備註:
                        #無.
                        $getMeetMultiConditionsString=search::getMeetMultiConditionsString($conf["search::getMeetMultiConditionsString"]);
                        unset($conf["search::getMeetMultiConditionsString"]);
                        
                        #如果執行出錯
                        if($getMeetMultiConditionsString["status"]==="false"){
                        
                                #設置執行不正常
                                $result["status"]="false";

                                #執行到這邊代表檢查通過
                                $result["error"]=$getMeetMultiConditionsString;

                                #回傳結果
                                return $result;
                        
                                }#if end
                                
                        #如果不是可以解析的時間單位
                        if($getMeetMultiConditionsString["founded"]==="false"){
                        
                                #可能為分鐘
                                #判斷分鐘是否為 M、m、Min、min、Mins、mins 結尾
                                #函式說明:
                                #取得符合多個特定字首與字尾的字串
                                #回傳結果:
                                #$result["status"],若爲"true"則代表執行正常;若爲"false"則代表執行失敗。
                                #$result["function"],當前執行的函數名稱.
                                #$result["error"],錯誤訊息陣列.
                                #$result["founded"],若為"true"則代表有找到符合字首條件的結果;若爲"false"則代表沒有找到。
                                #$result["content"],符合條件的字串,去掉字首字尾後的結果.
                                #$result["returnString"],爲符合字首字、尾條件的字串內容。
                                #$result["argu"],使用的參數.
                                #必填參數:
                                #$conf["checkString"],字串,要檢查的字串.
                                $conf["search::getMeetMultiConditionsString"]["checkString"]=$singleTimeStr;
                                #$conf["keyWord"],字串陣列,用來檢查字首、字首應該要有哪些字串之一,每個元素代表一個可能的條件,key為front者代表開頭的關鍵字,key為tail為代表結尾的官關鍵字.
                                $conf["search::getMeetMultiConditionsString"]["keyWord"][]=array("tail"=>"M");
                                $conf["search::getMeetMultiConditionsString"]["keyWord"][]=array("tail"=>"m");
                                $conf["search::getMeetMultiConditionsString"]["keyWord"][]=array("tail"=>"Min");
                                $conf["search::getMeetMultiConditionsString"]["keyWord"][]=array("tail"=>"min");
                                $conf["search::getMeetMultiConditionsString"]["keyWord"][]=array("tail"=>"Mins");
                                $conf["search::getMeetMultiConditionsString"]["keyWord"][]=array("tail"=>"mins");
                                #可省略參數:
                                #無.
                                #參考資料:
                                #無.
                                #備註:
                                #無.
                                $getMeetMultiConditionsString_singleTimeStr=search::getMeetMultiConditionsString($conf["search::getMeetMultiConditionsString"]);
                                unset($conf["search::getMeetMultiConditionsString"]);
                                
                                #如果執行出錯
                                if($getMeetMultiConditionsString_singleTimeStr["status"]==="false"){
                                
                                        #設置執行不正常
                                        $result["status"]="false";

                                        #執行到這邊代表檢查通過
                                        $result["error"]=$getMeetMultiConditionsString_singleTimeStr;

                                        #回傳結果
                                        return $result;
                                
                                        }#if end
                                        
                                #如果不是可以解析的時間單位
                                if($getMeetMultiConditionsString_singleTimeStr["founded"]==="false"){
                                
                                        #設置執行不正常
                                        $result["status"]="false";

                                        #執行到這邊代表檢查通過
                                        $result["error"]=$getMeetMultiConditionsString_singleTimeStr;

                                        #回傳結果
                                        return $result;
                                
                                        }#if end
                                
                                #轉換成分鐘
                                $resultMin=$getMeetMultiConditionsString_singleTimeStr["content"];
                                
                                #更新成用分鐘表示的時間
                                $spiltString["dataArray"][$index]=$resultMin;
                                
                                #換下一個 $singleTimeStr
                                continue;
                        
                                }#if end
                        
                        #轉換成分鐘
                        $resultMin=$getMeetMultiConditionsString["content"]*60;
                        
                        #更新成用分鐘表示的時間
                        $spiltString["dataArray"][$index]=$resultMin;
                
                        }#foreach end
                                
                #初始化暫存分鐘的加總
                $resultMin=0;
                
                #針對每個分鐘時間
                foreach($spiltString["dataArray"] as $min){
                
                        #加總
                        $resultMin=$resultMin+$min;
                
                        }#foreach end
                                
                #儲存計算好的分鐘時間結果
                $result["content"]["M"]=$resultMin;     
                                
                #儲存計算好的小時時間結果
                $result["content"]["H"]=$resultMin/60;
        
                #暫存不到1小時的分鐘
                $minsLessOneHour=$result["content"]["M"]%60;
        
                #暫存剔除分鐘後的整數小時
                $hours=($result["content"]["M"]-$minsLessOneHour)/60;
        
                #儲存換算成小時加分鐘的表示
                $result["content"]["HM"]=$hours."h ".$minsLessOneHour."min";
        
                #設置執行正常
                $result["status"]="true";
        
                #回傳結果
                return $result;
        
                }#function caculate end

        /*
        #函式說明:
        #取得unixtime
        #回傳結果:
        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
        #$result["error"],錯誤訊息陣列.
        #$result["function"],當前執行的函數名稱.
        #$result["content"],unixtime.
        #必填參數:
        #無.
        #可省略參數:
        #無.
        #參考資料:
        #無.
        #備註:
        #無.
        */
        public static function unix(){
        
                #初始化要回傳的內容
                $result=array();
                
                #取得當前函數名稱
                $result["function"]=__FUNCTION__;
        
                #設置執行正常
                $result["status"]="true";
                
                #設置unixtime
                $result["content"]=time();
        
                #回傳結果
                return $result;
        
                }#functino unix end

        }#class end

?>