Files
ZiPingEightChar/vendor/tyme4py/culture/star/six.py
T
moxiaonian d9da4301cd 公众授权版:normal · 1000 次 · 有效期至 2026-12-31
副本编号 LY-20261007-AC63(水印指纹已嵌入)
含 README、.gitignore;排除 .DS_Store / __pycache__ / .pytest_cache
2026-10-07 17:29:52 +08:00

27 lines
638 B
Python

# -*- coding:utf-8 -*-
from __future__ import annotations
from typing import List, Union
from tyme4py import LoopTyme
class SixStar(LoopTyme):
"""六曜"""
NAMES: List[str] = ['先胜', '友引', '先负', '佛灭', '大安', '赤口']
"""名称"""
def __init__(self, index_or_name: Union[int, str]):
super().__init__(self.NAMES, index_or_name)
@classmethod
def from_name(cls, name: str) -> SixStar:
return cls(name)
@classmethod
def from_index(cls, index: int) -> SixStar:
return cls(index)
def next(self, n: int) -> SixStar:
return SixStar(self.next_index(n))