MCPcopy Create free account
hub / github.com/SpaceZephyr/myskill / _format_date

Method _format_date

workingnomads-scraper/scripts/parser.py:70–78  ·  view source on GitHub ↗

格式化日期

(self, date_str: str)

Source from the content-addressed store, hash-verified

68 return text
69
70 def _format_date(self, date_str: str) -> str:
71 """格式化日期"""
72 if not date_str:
73 return ""
74 try:
75 dt = datetime.fromisoformat(date_str.replace("Z", "+00:00"))
76 return dt.strftime("%Y-%m-%d")
77 except (ValueError, AttributeError):
78 return date_str
79
80
81def parse_jobs(raw_jobs: list[dict]) -> list[dict]:

Callers 1

parseMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected