| | |
| | | |
| | | |
| | | class HistoryKDatasUtils(object): |
| | | __previous_trading_date_cache={} |
| | | |
| | | @classmethod |
| | | def get_gp_latest_info(cls, codes, fields=None): |
| | |
| | | def get_previous_trading_date(cls, date): |
| | | return JueJinApi.get_previous_trading_date(date) |
| | | |
| | | @classmethod |
| | | def get_previous_trading_date_cache(cls, date): |
| | | if date in cls.__previous_trading_date_cache: |
| | | return cls.__previous_trading_date_cache.get(date) |
| | | fdata = cls.get_previous_trading_date(date) |
| | | if fdata: |
| | | cls.__previous_trading_date_cache[date] = fdata |
| | | return fdata |
| | | |
| | | # 返回指定日期的下个交易日 |
| | | @classmethod |
| | | def get_next_trading_date(cls, date): |