The time-since updater class is used to get a numerical value representing the amount of time that has passed between the current time and the user-specified start time. This value is returned in a unit defined by the unit attribute.

    <time-since date="2000-01-01" unit="days" />

The example shown in Code Sample 14 will set the build component to the number of days since the 1st of January 2000. This is the same method that Visual Studio uses to calculate auto-incrementing build numbers.

The date value is parsed using the DateTime.Parse method within the .NET Framework which is culture-specific. For this reason, it is recommended to always pass your dates in the international date format: "yyyy-MM-dd" this will prevent any issues with localisation.

In addition to absolute date values, the date attribute also accepts some special values:

Value Description
midnight Specifies midnight of the current day.

Last edited Jan 3, 2013 at 7:55 AM by trwolfe, version 1


No comments yet.