MCPcopy
hub / github.com/4thfever/cultivation-world-simulator / create_month_stamp

Function create_month_stamp

src/systems/time.py:43–45  ·  view source on GitHub ↗

从年和月创建MonthStamp

(year: Year, month: Month)

Source from the content-addressed store, hash-verified

41 return MonthStamp(int(self) + other)
42
43def create_month_stamp(year: Year, month: Month) -> MonthStamp:
44 """从年和月创建MonthStamp"""
45 return MonthStamp(int(year) * 12 + month.value - 1)
46
47def get_date_str(stamp: int) -> str:
48 """将 MonthStamp (int) 转换为 'X年Y月' 格式"""

Calls 1

MonthStampClass · 0.85