MCPcopy Create free account
hub / github.com/vastsa/FileCodeBox / date_value

Method date_value

apps/admin/services.py:1409–1414  ·  view source on GitHub ↗
(value: Any)

Source from the content-addressed store, hash-verified

1407
1408 def _get_sort_value(self, item: dict[str, Any], sort_by: str):
1409 def date_value(value: Any) -> float:
1410 if value is None:
1411 return 0
1412 if isinstance(value, datetime):
1413 return value.timestamp()
1414 return 0
1415
1416 sort_map = {
1417 "created_at": date_value(item.get("createdAt")),

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected