[0] InvalidArgumentException in Calendar.php line 640

不支持的日期:1900-1-30

  1. list($year, $month, $day) = explode('-', $date->format('Y-n-j'));
  2. // 参数区间1900.1.31~2100.12.31
  3. // if ($year < 1900 || $year > 2100) {
  4. // throw new InvalidArgumentException("不支持的年份:{$year}");
  5. // }
  6. // 年份限定、上限
  7. if (1900 == $year && 1 == $month && $day < 31) {
  8. throw new InvalidArgumentException("不支持的日期:{$year}-{$month}-{$day}");
  9. }
  10. $offset = $this->dateDiff($date, '1900-01-31')->days;
  11. for ($i = 1900; $i < 2101 && $offset > 0; ++$i) {
  12. $daysOfYear = $this->daysOfYear($i);
  13. $offset -= $daysOfYear;
  14. }

Call Stack

  1. in Calendar.php line 640
  2. at Calendar->solar2lunar('1900', '1', '30', null) in Calendar.php line 229
  3. at Calendar->solar('1900', '01', '30', null) in Calendar.php line 263
  4. at Calendar->lunar(null, null, null, null, null) in horoscope.php line 64
  5. at require('/home/codes/webcode/...') in Index.php line 1351
  6. at Index->horoscopetmp(object(Request))
  7. at ReflectionMethod->invokeArgs(object(Index), [object(Request)]) in App.php line 343
  8. at App::invokeMethod([object(Index), 'horoscopetmp'], []) in App.php line 611
  9. at App::module(['birthdatelibrary', 'index', 'horoscopetmp'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 456
  10. at App::exec(['type' => 'module', 'module' => ['birthdatelibrary', 'index', 'horoscopetmp']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  11. at App::run() in start.php line 19
  12. at require('/home/codes/webcode/...') in index.php line 17

Environment Variables

GET Data

sid
2022021610262a8
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
HTTP_HOST
www.amoyweb.com
PATH_INFO
/birthdatelibrary/index/horoscopetmp
REDIRECT_STATUS
200
SERVER_NAME
amoyweb.com
SERVER_PORT
443
SERVER_ADDR
122.114.147.160
REMOTE_PORT
49398
REMOTE_ADDR
3.232.108.171
SERVER_SOFTWARE
nginx/1.20.1
GATEWAY_INTERFACE
CGI/1.1
HTTPS
on
REQUEST_SCHEME
https
SERVER_PROTOCOL
HTTP/2.0
DOCUMENT_ROOT
/home/codes/webcode/amoyweb.com/public
DOCUMENT_URI
/index.php/birthdatelibrary/index/horoscopetmp
REQUEST_URI
/index.php/birthdatelibrary/index/horoscopetmp?sid=2022021610262a8
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
sid=2022021610262a8
SCRIPT_FILENAME
/home/codes/webcode/amoyweb.com/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php/birthdatelibrary/index/horoscopetmp
REQUEST_TIME_FLOAT
1711693627.0118
REQUEST_TIME
1711693627
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/home/codes/webcode/amoyweb.com/public/../application/
THINK_VERSION
5.0.24
THINK_START_TIME
1711693627.0122
THINK_START_MEM
367312
EXT
.php
DS
/
THINK_PATH
/home/codes/webcode/amoyweb.com/thinkphp/
LIB_PATH
/home/codes/webcode/amoyweb.com/thinkphp/library/
CORE_PATH
/home/codes/webcode/amoyweb.com/thinkphp/library/think/
TRAIT_PATH
/home/codes/webcode/amoyweb.com/thinkphp/library/traits/
ROOT_PATH
/home/codes/webcode/amoyweb.com/
EXTEND_PATH
/home/codes/webcode/amoyweb.com/extend/
VENDOR_PATH
/home/codes/webcode/amoyweb.com/vendor/
RUNTIME_PATH
/home/codes/webcode/amoyweb.com/runtime/
LOG_PATH
/home/codes/webcode/amoyweb.com/runtime/log/
CACHE_PATH
/home/codes/webcode/amoyweb.com/runtime/cache/
TEMP_PATH
/home/codes/webcode/amoyweb.com/runtime/temp/
CONF_PATH
/home/codes/webcode/amoyweb.com/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false