1
zj
2024-06-03 09206aedcfdf30050123e99f2af0a192ebad1de4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package com.nq.utils.stock;
 
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
 
import java.util.Calendar;
 
 
public class WithDrawUtils {
    private static final Logger log = LoggerFactory.getLogger(WithDrawUtils.class);
 
 
    public static boolean checkIsWithTime(int beginTime, int endTime) {
        Calendar c = Calendar.getInstance();
        int currentHour = c.get(11);
        log.info("當前小時 = {}", Integer.valueOf(currentHour));
 
        if (currentHour >= beginTime && currentHour < endTime) {
            return true;
        }
        return false;
    }
 
 
    public static void main(String[] args) {
        System.out.println(checkIsWithTime(19, 20));
    }
}