/upstream/macros/FormatExpiry
Type: /type/macro
description: Format loan expiry
macro: value: $def with(expiry)

$if expiry is None:
    $# Not yet fulfilled
    <span class="red">Not yet downloaded</span>
$else:
    $ expiry_datetime = datetime_from_isoformat(expiry)       
    <span class="darkgreen">$datestr(expiry_datetime)</span>