App: Add support for <date> metadata element

This commit is contained in:
Chris Hennes
2022-09-22 10:26:48 -05:00
parent 7470d800fd
commit ef6aacc318
5 changed files with 44 additions and 3 deletions

View File

@@ -145,6 +145,21 @@ void MetadataPy::setVersion(Py::Object args)
getMetadataPtr()->setVersion(App::Meta::Version());
}
Py::Object MetadataPy::getDate() const
{
return Py::String(getMetadataPtr()->date());
}
void MetadataPy::setDate(Py::Object args)
{
const char *date = nullptr;
if (!PyArg_Parse(args.ptr(), "z", &date))
throw Py::Exception();
if (date) getMetadataPtr()->setDate(date);
else
getMetadataPtr()->setDate("");
}
Py::Object MetadataPy::getDescription() const
{
return Py::String(getMetadataPtr()->description());