Skip to content

Commit

Permalink
Even more JSON-LD
Browse files Browse the repository at this point in the history
  • Loading branch information
davorg committed May 2, 2019
1 parent c4be0de commit f891d9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Literature/Schema/Result/Actor.pm
Expand Up @@ -141,6 +141,8 @@ sub json_ld_type { 'Person' }
sub json_ld_fields {
[ 'name',
{ birthDate => sub { $_[0]->born->strftime('%Y-%m-%d') } },
{ deathDate => sub { $_[0]->died ?
$_[0]->died->strftime('%Y-%m-%d') : undef } },
]
}

Expand Down
2 changes: 2 additions & 0 deletions lib/Literature/Schema/Result/Author.pm
Expand Up @@ -152,6 +152,8 @@ sub json_ld_fields {
[
'name',
{ birthDate => sub { $_[0]->born->strftime('%Y-%m-%d') } },
{ deathDate => sub { $_[0]->died ?
$_[0]->died->strftime('%Y-%m-%d') : undef } },
]
}

Expand Down

0 comments on commit f891d9e

Please sign in to comment.