This document is provided on an "AS IS" basis without warranties of any kind. Smartsite iXperion class libraries may change in future releases.
Represents the extended format for the cache.

Namespace: Smartsite.Tools.Caching.Expirations
Assembly:  Smartsite.Tools (in Smartsite.Tools.dll)

Syntax

C#Copy imageCopy Code
public class ExtendedFormat
Visual Basic (Declaration)Copy imageCopy Code
Public Class ExtendedFormat

Remarks

Extended format syntax :

  • Minute: 0-59
  • Hour: 0-23
  • Day of month: 1-31
  • Month: 1-12
  • Day of week: 0-6 (Sunday is 0)
  • Wildcards: * means run every

Examples:
  • * * * * * expires every minute
  • 5 * * * * expire 5th minute of every hour
  • * 21 * * * expire every minute of the 21st hour of every day
  • 31 15 * * * expire 3:31 PM every day
  • 7 4 * * 6 expire Saturday 4:07 AM
  • 15 21 4 7 * expire 9:15 PM on 4 July

Therefore 6 6 6 6 1 means:
  • have we crossed/entered the 6th minute AND
  • have we crossed/entered the 6th hour AND
  • have we crossed/entered the 6th day AND
  • have we crossed/entered the 6th month AND
  • have we crossed/entered A MONDAY?

Therefore these cases should exhibit these behaviors:
C# Copy imageCopy Code
	getTime = DateTime.Parse( "02/20/2003 04:06:55 AM" );
	nowTime = DateTime.Parse( "06/07/2003 07:07:00 AM" );
	isExpired = ExtendedFormatHelper.IsExtendedExpired( "6 6 6 6 1", getTime, nowTime );
Result: TRUE, ALL CROSSED/ENTERED
C# Copy imageCopy Code
	getTime = DateTime.Parse( "02/20/2003 04:06:55 AM" );
	nowTime = DateTime.Parse( "06/07/2003 07:07:00 AM" );
	isExpired = ExtendedFormatHelper.IsExtendedExpired( "6 6 6 6 5", getTime, nowTime );
Result: TRUE
C# Copy imageCopy Code
	getTime = DateTime.Parse( "02/20/2003 04:06:55 AM" );
	nowTime = DateTime.Parse( "06/06/2003 06:06:00 AM" );
	isExpired = ExtendedFormatHelper.IsExtendedExpired( "6 6 6 6 *", getTime, nowTime );
Result: TRUE
C# Copy imageCopy Code
	getTime = DateTime.Parse( "06/05/2003 04:06:55 AM" );
	nowTime = DateTime.Parse( "06/06/2003 06:06:00 AM" );
	isExpired = ExtendedFormatHelper.IsExtendedExpired( "6 6 6 6 5", getTime, nowTime );
Result: TRUE
C# Copy imageCopy Code
	getTime = DateTime.Parse( "06/05/2003 04:06:55 AM" );
	nowTime = DateTime.Parse( "06/06/2005 05:06:00 AM" );
	isExpired = ExtendedFormatHelper.IsExtendedExpired( "6 6 6 6 1", getTime, nowTime );
Result: TRUE
C# Copy imageCopy Code
	getTime = DateTime.Parse( "06/05/2003 04:06:55 AM" );
	nowTime = DateTime.Parse( "06/06/2003 05:06:00 AM" );
	isExpired = ExtendedFormatHelper.IsExtendedExpired( "6 6 6 6 1", getTime, nowTime );
Result: FALSE, we did not cross 6th hour, nor did we cross Monday
C# Copy imageCopy Code
	getTime = DateTime.Parse( "06/05/2003 04:06:55 AM" );
	nowTime = DateTime.Parse( "06/06/2003 06:06:00 AM" );
	isExpired = ExtendedFormatHelper.IsExtendedExpired( "6 6 6 6 5", getTime, nowTime );
Result: TRUE, we cross/enter Friday
C# Copy imageCopy Code
	getTime = DateTime.Parse( "06/05/2003 04:06:55 AM" );
	nowTime = DateTime.Parse( "06/06/2003 06:06:00 AM" );
	isExpired = ExtendedFormatHelper.IsExtendedExpired( "6 6 6 6 1", getTime, nowTime );
Result: FALSE, we don't cross Monday but all other conditions satisfied

Inheritance Hierarchy

System..::..Object
  Smartsite.Tools.Caching.Expirations..::..ExtendedFormat

See Also

Advanced