Expire Dates in umbraco or why I love the full API of umbraco

05 December 2005 by Niels Hartvig
Thanks to a great object-oriented design to which I owe Kasper B big time, one has access to any little tiny part of umbraco.

Today, one of my support contract customers asked the following:
I'm creating a section on a website for classified advertises, and wonder if it's possible to let them expire after 30 days of creation


Now with the final release of 2.1 with-in reach you can specify release and expiredates programmatically, so to specify that a new document in umbraco should expire after 30 days is as easy as one line:
document.ExpireDate = DateTime.Now.AddMonths(1);

Wonderful :-)

btw: Comments are up again - I'm using this site to test the latest umbraco builds before committing changes to SubVersion, so sometimes stuff can break...

0 comment(s) for “Expire Dates in umbraco or why I love the full API of umbraco”

    Leave comment:


    (not shown)


    (optional - remember http://)


    (sorry, but I'm getting too much spam)