MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / Date

Function Date

src/commoncode/datautils.py:267–290  ·  view source on GitHub ↗

Return a date attribute. It always serializes to an ISO date string. Behavior is TBD and for now this is exactly a string.

(
    default=None,
    validator=None,
    repr=False,
    eq=True,
    order=True,  # NOQA
    converter=None,
    label=None,
    help=None,
)

Source from the content-addressed store, hash-verified

265
266
267def Date(
268 default=None,
269 validator=None,
270 repr=False,
271 eq=True,
272 order=True, # NOQA
273 converter=None,
274 label=None,
275 help=None,
276): # NOQA
277 """
278 Return a date attribute. It always serializes to an ISO date string.
279 Behavior is TBD and for now this is exactly a string.
280 """
281 return String(
282 default=default,
283 validator=validator,
284 repr=repr,
285 eq=eq,
286 order=order,
287 converter=converter,
288 help=help,
289 label=label,
290 )

Callers 1

PackageDataClass · 0.90

Calls 1

StringFunction · 0.85

Tested by

no test coverage detected