Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Not really asking a question. Just putting this out there because of lack of documentation.
In Umbraco 8. Getting expired date of content has been moved. Probably to better handle publishing of cultured content.
Anyways myContent.ExpireDate is removed. myContent is a type of IContent you get from the content service.
You can get the expiration by:
var expiredate = myContent.ContentSchedule.FullSchedule.FirstOrDefault(a => a.Action == ContentScheduleAction.Expire).Date;
The contructor for ContentSchedule is
public ContentSchedule(string culture, DateTime date, ContentScheduleAction action)
So you can also query by culture if need be.
You can see this thread for setting a expire date:
We could add this to the documentation!
The documentation for Umbraco is Open Source,
so you can create Issues or make PRs to add and update the information there to help others working with Umbraco.
I'm wondering whether it would make sense to add a paragraph to this page:
about retrieving Scheduled Publishing information programatically?
I guess I could write something up. When I get a second free I'll go ahead an make a pull request on this page.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted