export function getPublishedDate()

in lib/recipes-data/src/lib/extract-recipes.ts [94:106]


export function getPublishedDate(
	block: Block,
	content: Content,
): Date | undefined {
	const feastChannel = content.channels?.find(
		(channel) => channel.channelId === 'feast',
	);
	return block.publishedDate
		? capiDateTimeToDate(block.publishedDate)
		: feastChannel?.fields.publicationDate
		? capiDateTimeToDate(feastChannel.fields.publicationDate)
		: undefined;
}