修改为年月日时分
This commit is contained in:
parent
bd5c1a1cd3
commit
e8c33399bf
@ -1110,8 +1110,8 @@ class OrderServicePackageService extends BaseService
|
||||
$days = (int)$month_time * 30;
|
||||
|
||||
// 获取开始日期
|
||||
$end_date = date('Y-m-d 23:59:59', strtotime($start_time . " +$days days"));
|
||||
$start_date = date('Y-m-d 00:00:00', strtotime($end_date . "-30 days"));
|
||||
$end_date = date('Y-m-d H:i:s', strtotime($start_time . " +$days days"));
|
||||
$start_date = date('Y-m-d H:i:s', strtotime($end_date . "-30 days"));
|
||||
|
||||
$InquiryService = new InquiryService();
|
||||
$order_inquiry = $InquiryService->getPatientServiceInquiry($service_type, $user_id, $doctor_id, $start_date, $end_date);
|
||||
@ -1129,9 +1129,6 @@ class OrderServicePackageService extends BaseService
|
||||
*/
|
||||
public function getCurrentMonthDate(string $start_time): array
|
||||
{
|
||||
$current_month_start_date = 0; // 当前所属月开始时间
|
||||
$current_month_finish_date = 0; // 当前所属月结束时间
|
||||
|
||||
// 获取开启服务日期和今日的相差天数
|
||||
$diff = abs(time() - strtotime($start_time));
|
||||
$diff_days = ceil($diff / (60 * 60 * 24)); // 转换为天数
|
||||
@ -1142,10 +1139,10 @@ class OrderServicePackageService extends BaseService
|
||||
$days = (int)$month_time * 30;
|
||||
|
||||
// 当前所属月开始时间
|
||||
$current_month_finish_date = date('Y-m-d 23:59:59', strtotime($start_time . " +$days days"));
|
||||
$current_month_finish_date = date('Y年m月d日 H时i分', strtotime($start_time . " +$days days"));
|
||||
|
||||
// 当前所属月结束时间
|
||||
$current_month_start_date = date('Y-m-d 00:00:00', strtotime($current_month_finish_date . "-30 days"));
|
||||
$current_month_start_date = date('Y年m月d日 H时i分', strtotime($current_month_finish_date . "-30 days"));
|
||||
|
||||
$result = array();
|
||||
$result['current_month_start_date'] = $current_month_start_date;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user